Skip to main content

MainMenuLogger

A class in Root.Township, the global namespace.

Singleton that logs main menu status messages to NLog and to an optional extra IMainMenuLogger (such as MainMenuPlayerLogger). Reach it with SingletonBehaviour<MainMenuLogger>.Instance.

Constructors​

MemberWhat it is
MainMenuLogger()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger for this class.

Properties​

MemberWhat it is
IMainMenuLogger Logger { get; set; }Extra logger that also gets each message, or null.

Methods​

MemberWhat it is
void Error(string errorMessage)Logs an error, with or without an exception, to NLog and to Logger.
void Error(Exception exception, string errorMessage = null)Logs an error, with or without an exception, to NLog and to Logger.
void Info(string logMessage)Logs an info message to NLog and to Logger.