> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class LoggerFactory

Namespace: [OpenTD.Logging](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/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.

```csharp theme={null}
public static class LoggerFactory
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[LoggerFactory](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Logging.LoggerFactory.md)

## Inherited Members

[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Fields

### Initialized

```csharp theme={null}
public static bool Initialized
```

#### Field Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Properties

### LogConfigPath

```csharp theme={null}
public static string LogConfigPath { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### GetLogger(string)

Get a new Logger. Hint: create a static logger for your class
and name it with the class name.

```csharp theme={null}
public static Logger GetLogger(string name)
```

#### Parameters

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Returns

[Logger](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Logging.Logger.md)

#### See Also

[Logger](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Logging.Logger.md)

### GetLogger()

Get a new Logger, with a default name.

```csharp theme={null}
public static Logger GetLogger()
```

#### Returns

[Logger](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Logging.Logger.md)

#### See Also

[Logger](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Logging.Logger.md)

### LogAndThrowException(string, Logger, Exception, bool)

```csharp theme={null}
public static void LogAndThrowException(string msg, Logger log, Exception innerEx = null, bool justWarning = false)
```

#### Parameters

`msg` [string](https://learn.microsoft.com/dotnet/api/system.string)

`log` [Logger](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Logging.Logger.md)

`innerEx` [Exception](https://learn.microsoft.com/dotnet/api/system.exception)

`justWarning` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## See Also

[Logger](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Logging.Logger.md)
