public sealed class PlatformSinkThe log where the platform's own tooling looks for it: logcat on Android, the unified log on Apple platforms, the journal on Linux, the debugger's output window on Windows, and the browser console on the web.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The sink that makes mobile debugging possible at all. A phone has no terminal and a crash there produces a native tombstone plus whatever logcat caught; a build whose engine log never reaches logcat is a build whose last words are the operating system's, not the engine's.
Apple gets syslog(3), not os_log proper. The unified logging system captures syslog writes, so the lines do appear in log stream and in Console.app; what is lost is the subsystem/category pairing and the deferred formatting that os_log's own API gives. Reaching that API means _os_log_impl, which takes a compiled format descriptor that cannot be produced from managed code — it needs a native shim, and a shim belongs in Vixen.Platform.Native beside the other ones rather than being the reason this sink does not exist.
Windows gets OutputDebugStringW, which is what a debugger, DebugView and the Visual Studio output window all read.
The browser gets Console, whose output the WebAssembly runtime already routes to console.log. Calling console.log through JS interop directly would need a browser-wasm target this assembly does not have, and would land in the same place.
On a platform with none of those, IsSupported is and writing does nothing — a sink that threw on an unrecognised OS would take the process down for the sake of a log line.
Fields and properties (3)
public const string DefaultTagThe tag used when none is given.
public static bool IsSupportedWhether this platform has a log this sink can reach.
public string TagThe tag every line carries. What logcat -s filters on.
Methods (2)
Used by (1)
- SinkTestsVixen.Core.Diagnostics.Tests