Skip to main content

OpenTD reference 2026 R1

Class LoggerFactory

Last update: 09.03.2026

Namespace: 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

object ← LoggerFactory

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

bool

Properties

LogConfigPath

public static string LogConfigPath { get; }

Property Value

string

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

Logger

See Also

Logger

GetLogger()

Get a new Logger, with a default name.

public static Logger GetLogger()

Returns

Logger

See Also

Logger

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

See Also

Logger

Connect with Ansys