docs.unity3d.com
    Show / Hide Table of Contents

    Class Logger

    Inheritance
    Object
    BaseLogger
    Logger
    Inherited Members
    BaseLogger._type
    BaseLogger._userPath
    BaseLogger._name
    BaseLogger._extension
    BaseLogger._sequence
    BaseLogger._suffixAction
    BaseLogger._loggerSuffixOption
    BaseLogger.SetOutputPath(String, String, String, String, Func<String>, LoggerSuffixOption)
    BaseLogger.GetPath()
    Namespace: Unity.Simulation
    Syntax
    public class Logger : BaseLogger

    Constructors

    Logger(String, Int32, Int32, String, LoggerSuffixOption, Func<String>)

    Initializes a new instance of DataCapture logger with given params.

    Declaration
    public Logger(string logName, int bufferSize = 8192, int maxElapsedSeconds = 5, string userPath = "", LoggerSuffixOption suffixOption = LoggerSuffixOption.SEQ_NO, Func<string> customSuffix = null)
    Parameters
    Type Name Description
    String logName

    Name of the DataCapture Log file.

    Int32 bufferSize

    This corresponds to the file size (in KB). Default is set to 8192.

    Int32 maxElapsedSeconds
    String userPath

    Location of the log file. Default is set to Application persistent path.

    LoggerSuffixOption suffixOption
    Func<String> customSuffix

    Properties

    bufferSize

    Declaration
    public int bufferSize { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    Flushall(Boolean)

    Flush data in the buffer to the file system right away. Usually it waits till the size of the buffer reaches to the bufferSize set.

    Declaration
    public void Flushall(bool synchronous = false)
    Parameters
    Type Name Description
    Boolean synchronous

    Log(Object)

    Logs the data to the file by appending it to the current buffer.

    Declaration
    public void Log(object parameters)
    Parameters
    Type Name Description
    Object parameters

    Serializable struct containing data to be captured.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023