Class LoggerFactory
Last update: 09.03.2026Namespace: OpenTD.Logging
Assembly: OpenTD.dll
Use LoggerFactory to generate new Loggers. LogConfigPath is the path to a configuration file that is read when OpenTD is first started. Control where logs are written using this file.
public static class LoggerFactory
Inheritance
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Fields
Initialized
public static bool Initialized
Field Value
Properties
LogConfigPath
public static string LogConfigPath { get; }
Property Value
Methods
GetLogger(string)
Get a new Logger. Hint: create a static logger for your class and name it with the class name.
public static Logger GetLogger(string name)
Parameters
name string
Returns
See Also
GetLogger()
Get a new Logger, with a default name.
public static Logger GetLogger()
Returns
See Also
LogAndThrowException(string, Logger, Exception, bool)
public static void LogAndThrowException(string msg, Logger log, Exception innerEx = null, bool justWarning = false)
Parameters
msg string
log Logger
innerEx Exception
justWarning bool