docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Show / Hide Table of Contents
    • AddCollectorMenuAttribute
  • Unity.Simulation
    • AggregatedSample
    • AggregationEvent
    • ArrayCast
    • ArrayUtilities
    • AsyncRequest
    • AsyncRequest.ExecutionContext
    • AsyncRequest.Result
    • AsyncRequest.State
    • AsyncRequest<T>
    • BaseDataConsumer<T>
    • BaseDataConsumer<T>.Uploadable
    • Category
    • ChunkedStream
    • ChunkedUnityLog
    • CollectorBase
    • CollectorBase.ConsumeCollectorReport
    • CollectorElement
    • CollectorsBaseEditor
    • CollectorsList
    • Configuration
    • Configuration.SimulationConfiguration
    • ContentType
    • ContinuousEvents
    • ContinuousEvents.EventCollectionDelegate
    • ContinuousEvents.EventDispatchDelegate
    • CoreProfilerUtils
    • CounterEvent
    • CounterEventData
    • DXChunkedStream
    • DXChunkedUnityLog
    • DXFile
    • DXFormat
    • DXManager
    • DXTimeLogger
    • DataCapturePaths
    • DirectoryNameComponent
    • Dispatcher
    • EventBase
    • ExecUtility
    • ExitPlaymode
    • ExtensionNameComponent
    • FileNameComponent
    • FileProducer
    • Format
    • FrameCountCondition
    • FrameLimit
    • FrameNumberNameComponent
    • ICondition
    • IDataProduced
    • IGlobalProfilerDataDispatcher
    • IgnoreCollectorAttribute
    • LabelNameComponent
    • LambdaJob
    • LambdaJob.DelegateType
    • Log
    • Log.Level
    • Manager
    • Manager.NotificationDelegate
    • Manager.TickDelegate
    • NameComponent
    • NameGenerator
    • Options
    • PackageImportTests
    • PathUtility
    • PerfStatsManager
    • PlayerResolution
    • PlayerResolutionSettings
    • ProfilerManager
    • ProfilerProperties
    • ProfilerReport
    • ProfilerSamplingEvent
    • ReportingUtils
    • Sample
    • SampleProfilerCollector
    • SequenceNameComponent
    • SequencedPathName
    • SignedURLDataConsumer
    • SimSecondsCondition
    • SimulationProfiler
    • SimulationProfilerBase
    • SimulationProfilerEditor
    • TestUtility
    • ThreadUtility
    • TimeLimit
    • TimeLogger
    • TimeScale
    • TimeScaleEditor
    • TimeUtility
    • Timer
    • TimerSource
    • TimestampNameComponent
    • WallSecondsCondition

Class ChunkedUnityLog

Unity log handler that dispatches in chunks.

Inheritance
object
ChunkedUnityLog
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
public static class ChunkedUnityLog

Fields

kDefaultBufferSize

Default buffer size in bytes.

Declaration
public const int kDefaultBufferSize = 8192
Field Value
Type Description
int

kDefaultMaxSecondsElapsed

Time after which log lines will be flushed.

Declaration
public const float kDefaultMaxSecondsElapsed = 5
Field Value
Type Description
float

kMaxLogLineLength

Max log line length in bytes.

Declaration
public const int kMaxLogLineLength = 1024
Field Value
Type Description
int

Methods

Capture(int, float, Func<AsyncRequest<object>, Result>)

Enable capture log with bufferSize and maxTimeElapsed.

Declaration
public static void Capture(int bufferSize = 8192, float maxElapsedSeconds = 5, Func<AsyncRequest<object>, AsyncRequest.Result> functor = null)
Parameters
Type Name Description
int bufferSize

Maximum buffer size to hold in memory before the data is flushed down to the file system.

float maxElapsedSeconds

Maximum time to hold the data in the buffer before it is flushed down to the file system.

Func<AsyncRequest<object>, AsyncRequest.Result> functor

Callback to be invoked to consume the log produced.

CaptureToFile(string, bool, int, float, bool)

Capture chunked logging to the file at the given path

Declaration
public static void CaptureToFile(string path, bool addSequenceNumber = true, int bufferSize = 8192, float maxElapsedSeconds = 5, bool replayExistingLog = false)
Parameters
Type Name Description
string path

Path to the chunked log file

bool addSequenceNumber

boolean indicating if sequence number needs to be appended at the end

int bufferSize

Maximum buffer size to hold in memory before the data is flushed down to the file system

float maxElapsedSeconds

Maximum time to hold the data in the buffer before it is flushed down to the file system.

bool replayExistingLog

EndCapture()

End capturing of the chunked logs.

Declaration
public static void EndCapture()

SetLogStackTracing(StackTraceLogType)

Set the log stack trace type.

Declaration
public static void SetLogStackTracing(StackTraceLogType logType)
Parameters
Type Name Description
StackTraceLogType logType

Stack trace logging option.

In This Article
Back to top
Copyright © 2026 Unity Technologies — Trademarks and terms of use
  • Legal
  • Privacy Policy
  • Cookie Policy
  • Do Not Sell or Share My Personal Information