Show / Hide Table of Contents

# Class Logger

The logger base class. Provides the format for console logs.

##### Inheritance

Object
Logger
StandardLogger

##### Inherited Members

Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

###### Namespace: IPA.Logging

###### Assembly: IPA.Loader.dll

##### Syntax

    public abstract class Logger

### Properties

| Improve this Doc View Source

#### LogFormat

The standard format for log messages.

##### Declaration

    public static string LogFormat { get; protected set; }

##### Property Value

Type | Description
--- | ---
String | the format for the standard loggers to print in

### Methods

| Improve this Doc View Source

#### Critical(Exception)

Sends an exception as a critical message. Equivalent to `Log(Level.Critical, e);`

##### Declaration

    public virtual void Critical(Exception e)

##### Parameters

Type | Name | Description
--- | --- | ---
Exception | e | the exception to log

##### See Also

Log(Logger.Level, Exception)
| Improve this Doc View Source

#### Critical(String)

Sends a critical message. Equivalent to `Log(Level.Critical, message);`

##### Declaration

    public virtual void Critical(string message)

##### Parameters

Type | Name | Description
--- | --- | ---
String | message | the message to log

##### See Also

Log(Logger.Level, String)
| Improve this Doc View Source

#### Debug(Exception)

Sends an exception as a debug message. Equivalent to `Log(Level.Debug, e);`

##### Declaration

    public virtual void Debug(Exception e)

##### Parameters

Type | Name | Description
--- | --- | ---
Exception | e | the exception to log

##### See Also

Log(Logger.Level, Exception)
| Improve this Doc View Source

#### Debug(String)

Sends a debug message. Equivalent to `Log(Level.Debug, message);`

##### Declaration

    public virtual void Debug(string message)

##### Parameters

Type | Name | Description
--- | --- | ---
String | message | the message to log

##### See Also

Log(Logger.Level, String)
| Improve this Doc View Source

#### Error(Exception)

Sends an exception as an error message. Equivalent to `Log(Level.Error, e);`

##### Declaration

    public virtual void Error(Exception e)

##### Parameters

Type | Name | Description
--- | --- | ---
Exception | e | the exception to log

##### See Also

Log(Logger.Level, Exception)
| Improve this Doc View Source

#### Error(String)

Sends an error message. Equivalent to `Log(Level.Error, message);`

##### Declaration

    public virtual void Error(string message)

##### Parameters

Type | Name | Description
--- | --- | ---
String | message | the message to log

##### See Also

Log(Logger.Level, String)
| Improve this Doc View Source

#### Info(Exception)

Sends an exception as an info message. Equivalent to `Log(Level.Info, e);`

##### Declaration

    public virtual void Info(Exception e)

##### Parameters

Type | Name | Description
--- | --- | ---
Exception | e | the exception to log

##### See Also

Log(Logger.Level, Exception)
| Improve this Doc View Source

#### Info(String)

Sends an info message. Equivalent to `Log(Level.Info, message);`

##### Declaration

    public virtual void Info(string message)

##### Parameters

Type | Name | Description
--- | --- | ---
String | message | the message to log

##### See Also

Log(Logger.Level, String)
| Improve this Doc View Source

#### Log(Logger.Level, Exception)

A basic log function taking an exception to log.

##### Declaration

    public virtual void Log(Logger.Level level, Exception e)

##### Parameters

Type | Name | Description
--- | --- | ---
Logger.Level | level | the level of the message
Exception | e | the exception to log

| Improve this Doc View Source

#### Log(Logger.Level, String)

A basic log function.

##### Declaration

    public abstract void Log(Logger.Level level, string message)

##### Parameters

Type | Name | Description
--- | --- | ---
Logger.Level | level | the level of the message
String | message | the message to log

| Improve this Doc View Source

#### Notice(Exception)

Sends an exception as a notice message. Equivalent to `Log(Level.Notice, e);`

##### Declaration

    public virtual void Notice(Exception e)

##### Parameters

Type | Name | Description
--- | --- | ---
Exception | e | the exception to log

##### See Also

Log(Logger.Level, Exception)
| Improve this Doc View Source

#### Notice(String)

Sends a notice message. Equivalent to `Log(Level.Notice, message);`

##### Declaration

    public virtual void Notice(string message)

##### Parameters

Type | Name | Description
--- | --- | ---
String | message | the message to log

##### See Also

Log(Logger.Level, String)
| Improve this Doc View Source

#### Warn(Exception)

Sends an exception as a warning message. Equivalent to `Log(Level.Warning, e);`

##### Declaration

    public virtual void Warn(Exception e)

##### Parameters

Type | Name | Description
--- | --- | ---
Exception | e | the exception to log

##### See Also

Log(Logger.Level, Exception)
| Improve this Doc View Source

#### Warn(String)

Sends a warning message. Equivalent to `Log(Level.Warning, message);`

##### Declaration

    public virtual void Warn(string message)

##### Parameters

Type | Name | Description
--- | --- | ---
String | message | the message to log

##### See Also

Log(Logger.Level, String)

### Extension Methods

LoggerExtensions.GetChildLogger(Logger, String)
ReflectionUtil.SetPrivateField(Object, String, Object)
ReflectionUtil.GetPrivateField<T>(Object, String)
ReflectionUtil.SetPrivateProperty(Object, String, Object)
ReflectionUtil.InvokePrivateMethod(Object, String, Object[])
ReflectionUtil.InvokePrivateMethod<T>(Object, String, Object[])