Skip to main content

UnityLogUtility

A static class in Root.Township, the global namespace.

Converts between Unity log types, NLog levels and the game's LoggingLevel.

Methods​

MemberWhat it is
static LogLevel ConvertToNLogLevel(LogType logType)Maps a Unity LogType or a LoggingLevel to an NLog level. Unity exceptions become Fatal, asserts become Error.
static LogLevel ConvertToNLogLevel(LoggingLevel logLevel)Maps a Unity LogType or a LoggingLevel to an NLog level. Unity exceptions become Fatal, asserts become Error.
static LogType ConvertToUnityLogLevel(LogLevel logLevel)Maps an NLog level to a Unity LogType: Trace to Info become Log, Warn becomes Warning, Error and Fatal become Error.