Skip to main content

UnityLogHandler

A class in Root.Township, the global namespace.

A Unity ILogHandler that sends Unity's own logs and exceptions into NLog, prefixed as unhandled.

Constructors​

MemberWhat it is
UnityLogHandler()Creates an UnityLogHandler with default values.

Fields​

1 private and internal field
MemberWhat it is
private Logger unhandledLoggerNLog logger the messages go to.

Methods​

MemberWhat it is
void LogException(Exception exception, Object context)Logs the exception and its context to NLog as an error.
void LogFormat(LogType logType, Object context, string format, params object[] args)Logs a Unity message to NLog at the matching level, prefixed with Unhandled Unity Log.