docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct FileRollingLogic<T>

    Class that implements rolling logic

    Implements
    IFileOperations
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Logging.Sinks
    Assembly: Unity.Logging.dll
    Syntax
    [BurstCompile]
    [GenerateTestsForBurstCompatibility]
    public struct FileRollingLogic<T> : IFileOperations, IDisposable where T : IFileOperationsImplementation
    Type Parameters
    Name Description
    T

    Constructors

    FileRollingLogic(IntPtr)

    Create from a state pointer

    Declaration
    public FileRollingLogic(IntPtr pointer)
    Parameters
    Type Name Description
    IntPtr pointer

    State pointer

    Properties

    IsCreated

    True if state is not null

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    bool

    Methods

    Append(byte*, ulong, bool)

    Update state on data that is appended and writes data into the file

    Declaration
    public void Append(byte* data, ulong length, bool newLine)
    Parameters
    Type Name Description
    byte* data

    Data to write

    ulong length

    Length of data to write

    bool newLine

    If true - newline is going to be added after the data

    Dispose()

    Dispose all resources

    Declaration
    public void Dispose()

    Flush()

    Flush any ongoing file operations

    Declaration
    public void Flush()

    GetPointer()

    Returns state pointer

    Declaration
    public IntPtr GetPointer()
    Returns
    Type Description
    IntPtr

    State pointer

    OpenFileForLogging(ref Configuration)

    Initializes state with file sink configuration

    Declaration
    public bool OpenFileForLogging(ref FileSinkSystem.Configuration config)
    Parameters
    Type Name Description
    FileSinkSystem.Configuration config

    Configuration to use

    Returns
    Type Description
    bool

    True if file stream was created successfully

    Implements

    IFileOperations
    IDisposable
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)