Class Logger
- Namespace
- MonkeyLoader.Logging
- Assembly
- MonkeyLoader.dll
Contains the logging functionality mods and patchers can use to log messages to game-specific channels.
public sealed class Logger
- Inheritance
-
Logger
- Inherited Members
Constructors
Logger(Logger, string)
Creates a new logger instance owned by the same MonkeyLoggingController.
public Logger(Logger logger, string extraIdentifier)
Parameters
loggerLoggerThe logger instance to copy.
extraIdentifierstringThe extra identifier to append to the
logger's.
Properties
Controller
Gets the LoggingController instance that this logger works for.
public LoggingController Controller { get; }
Property Value
Identifier
Gets the identifier that's added to this logger's messages to determine the source.
public string Identifier { get; }
Property Value
Level
Gets the current LoggingLevel used to filter requests, determined by the LoggingController instance this logger works for.
public LoggingLevel Level { get; }
Property Value
Methods
Debug(IEnumerable<Func<object>>)
Logs events considered to be useful during debugging when more granular information is needed.
public void Debug(IEnumerable<Func<object>> messageProducers)
Parameters
messageProducersIEnumerable<Func<object>>The producers to log as individual lines if possible.
Debug(IEnumerable<object>)
Logs events considered to be useful during debugging when more granular information is needed.
public void Debug(IEnumerable<object> messages)
Parameters
messagesIEnumerable<object>The messages to log as individual lines if possible.
Debug(Func<object>)
Logs events considered to be useful during debugging when more granular information is needed.
public void Debug(Func<object> messageProducer)
Parameters
Debug(params Func<object>[])
Logs events considered to be useful during debugging when more granular information is needed.
public void Debug(params Func<object>[] messageProducers)
Parameters
Error(IEnumerable<Func<object>>)
Logs that one or more functionalities are not working, preventing some from working correctly.
public void Error(IEnumerable<Func<object>> messageProducers)
Parameters
messageProducersIEnumerable<Func<object>>The producers to log as individual lines if possible.
Error(IEnumerable<object>)
Logs that one or more functionalities are not working, preventing some from working correctly.
public void Error(IEnumerable<object> messages)
Parameters
messagesIEnumerable<object>The messages to log as individual lines if possible.
Error(Func<object>)
Logs that one or more functionalities are not working, preventing some from working correctly.
public void Error(Func<object> messageProducer)
Parameters
Error(params Func<object>[])
Logs that one or more functionalities are not working, preventing some from working correctly.
public void Error(params Func<object>[] messageProducers)
Parameters
Fatal(IEnumerable<Func<object>>)
Logs that one or more key functionalities, or the whole system isn't working.
public void Fatal(IEnumerable<Func<object>> messageProducers)
Parameters
messageProducersIEnumerable<Func<object>>The producers to log as individual lines if possible.
Fatal(IEnumerable<object>)
Logs that one or more key functionalities, or the whole system isn't working.
public void Fatal(IEnumerable<object> messages)
Parameters
messagesIEnumerable<object>The messages to log as individual lines if possible.
Fatal(Func<object>)
Logs that one or more key functionalities, or the whole system isn't working.
public void Fatal(Func<object> messageProducer)
Parameters
Fatal(params Func<object>[])
Logs that one or more key functionalities, or the whole system isn't working.
public void Fatal(params Func<object>[] messageProducers)
Parameters
Flush()
Flushes any not yet fully logged messages.
public void Flush()
Info(IEnumerable<Func<object>>)
Logs that something happened, which is purely informative and can be ignored during normal use.
public void Info(IEnumerable<Func<object>> messageProducers)
Parameters
messageProducersIEnumerable<Func<object>>The producers to log as individual lines if possible.
Info(IEnumerable<object>)
Logs that something happened, which is purely informative and can be ignored during normal use.
public void Info(IEnumerable<object> messages)
Parameters
messagesIEnumerable<object>The messages to log as individual lines if possible.
Info(Func<object>)
Logs that something happened, which is purely informative and can be ignored during normal use.
public void Info(Func<object> messageProducer)
Parameters
Info(params Func<object>[])
Logs that something happened, which is purely informative and can be ignored during normal use.
public void Info(params Func<object>[] messageProducers)
Parameters
ShouldLog(LoggingLevel)
Determines whether the given LoggingLevel should be logged at the current Level.
public bool ShouldLog(LoggingLevel level)
Parameters
levelLoggingLevelThe LoggingLevel to check.
Returns
- bool
trueif the given LoggingLevel should be logged right now; otherwise,false.
Trace(IEnumerable<Func<object>>)
Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.
public void Trace(IEnumerable<Func<object>> messageProducers)
Parameters
messageProducersIEnumerable<Func<object>>The producers to log as individual lines if possible.
Trace(IEnumerable<object>)
Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.
public void Trace(IEnumerable<object> messages)
Parameters
messagesIEnumerable<object>The messages to log as individual lines if possible.
Trace(Func<object>)
Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.
public void Trace(Func<object> messageProducer)
Parameters
Trace(params Func<object>[])
Logs step by step execution of code that can be ignored during standard operation, but may be useful during extended debugging sessions.
public void Trace(params Func<object>[] messageProducers)
Parameters
Warn(IEnumerable<Func<object>>)
Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.
public void Warn(IEnumerable<Func<object>> messageProducers)
Parameters
messageProducersIEnumerable<Func<object>>The producers to log as individual lines if possible.
Warn(IEnumerable<object>)
Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.
public void Warn(IEnumerable<object> messages)
Parameters
messagesIEnumerable<object>The messages to log as individual lines if possible.
Warn(Func<object>)
Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.
public void Warn(Func<object> messageProducer)
Parameters
Warn(params Func<object>[])
Logs that unexpected behavior happened, but work is continuing and the key functionalities are operating as expected.
public void Warn(params Func<object>[] messageProducers)