Skip to content

Sinks

Sinks write formatted log messages somewhere. Add them with Log.Container.AddSink().

Sink Description
UnityLogSink() Writes to UnityEngine.Debug.Log/Warning/Error. Added automatically.
FileLogSink(path, maxSizeBytes) Writes to a text file. Rotates when size is exceeded.
ConsoleLogSink() Writes to System.Console. Good for headless builds.
Log.Container.AddSink(new UnityLogSink());
Log.Container.AddSink(new FileLogSink("Logs/Game.log", 100L * 1024 * 1024));