Class LoggerBase
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Base implementation for ILogger which implements all methods besides a new abstract method LogImpl(EnumLogType, string, params object[]).
public abstract class LoggerBase : ILogger
- Inheritance
-
LoggerBase
- Implements
- Inherited Members
- Extension Methods
Fields
SourcePath
public static string SourcePath
Field Value
Properties
TraceLog
If true, will also print to Diagnostics.Debug.
public bool TraceLog { get; set; }
Property Value
Methods
Audit(string)
Adds a new Audit log entry with the specified message.
public void Audit(string message)
Parameters
message
string
Audit(string, params object[])
Adds a new Audit log entry with the specified format string and arguments.
public void Audit(string format, params object[] args)
Parameters
Build(string)
Adds a new Build log entry with the specified message.
public void Build(string message)
Parameters
message
string
Build(string, params object[])
Adds a new Build log entry with the specified format string and arguments.
public void Build(string format, params object[] args)
Parameters
Chat(string)
Adds a new Chat log entry with the specified message.
public void Chat(string message)
Parameters
message
string
Chat(string, params object[])
Adds a new Chat log entry with the specified format string and arguments.
public void Chat(string format, params object[] args)
Parameters
CleanStackTrace(string)
Remove the full path from the stacktrace of the machine that compiled the code
public static string CleanStackTrace(string stackTrace)
Parameters
stackTrace
string
Returns
ClearWatchers()
Removes any handler that registered to the EntryAdded event. This method is called when the client leaves a world or server shuts down.
public void ClearWatchers()
Debug(string)
Adds a new Debug log entry with the specified message.
public void Debug(string message)
Parameters
message
string
Debug(string, params object[])
Adds a new Debug log entry with the specified format string and arguments.
public void Debug(string format, params object[] args)
Parameters
Error(Exception)
Convenience method for logging exceptions in try/catch blocks
public void Error(Exception e)
Parameters
Error(string)
Adds a new Error log entry with the specified message.
public void Error(string message)
Parameters
message
string
Error(string, params object[])
Adds a new Error log entry with the specified format string and arguments.
public void Error(string format, params object[] args)
Parameters
Event(string)
Adds a new Event log entry with the specified message.
public void Event(string message)
Parameters
message
string
Event(string, params object[])
Adds a new Event log entry with the specified format string and arguments.
public void Event(string format, params object[] args)
Parameters
Fatal(Exception)
Convenience method for logging exceptions in try/catch blocks
public void Fatal(Exception e)
Parameters
Fatal(string)
Adds a new Fatal log entry with the specified message.
public void Fatal(string message)
Parameters
message
string
Fatal(string, params object[])
Adds a new Fatal log entry with the specified format string and arguments.
public void Fatal(string format, params object[] args)
Parameters
Log(EnumLogType, string)
Adds a new log entry with the specified log type and message.
public void Log(EnumLogType logType, string message)
Parameters
logType
EnumLogTypemessage
string
Log(EnumLogType, string, params object[])
Adds a new log entry with the specified log type, format string and arguments.
public void Log(EnumLogType logType, string format, params object[] args)
Parameters
logType
EnumLogTypeformat
stringargs
object[]
LogImpl(EnumLogType, string, params object[])
This is the only method necessary to be overridden by the implementing class, actually does the logging as necessary.
protected abstract void LogImpl(EnumLogType logType, string format, params object[] args)
Parameters
logType
EnumLogTypeformat
stringargs
object[]
Notification(string)
Adds a new Notification log entry with the specified message.
public void Notification(string message)
Parameters
message
string
Notification(string, params object[])
Adds a new Notification log entry with the specified format string and arguments.
public void Notification(string format, params object[] args)
Parameters
StoryEvent(string)
Adds a new StoryEvent log entry with the specified message.
public void StoryEvent(string message)
Parameters
message
string
StoryEvent(string, params object[])
Adds a new StoryEvent log entry with the specified format string and arguments.
public void StoryEvent(string format, params object[] args)
Parameters
VerboseDebug(string)
Adds a new VerboseDebug log entry with the specified message.
public void VerboseDebug(string message)
Parameters
message
string
VerboseDebug(string, params object[])
Adds a new VerboseDebug log entry with the specified format string and arguments.
public void VerboseDebug(string format, params object[] args)
Parameters
Warning(Exception)
Convenience method for logging exceptions in try/catch blocks
public void Warning(Exception e)
Parameters
Warning(string)
Adds a new Warning log entry with the specified message.
public void Warning(string message)
Parameters
message
string
Warning(string, params object[])
Adds a new Warning log entry with the specified format string and arguments.
public void Warning(string format, params object[] args)
Parameters
Worldgen(Exception)
public void Worldgen(Exception e)
Parameters
Worldgen(string)
public void Worldgen(string message)
Parameters
message
string
Worldgen(string, params object[])
public void Worldgen(string format, params object[] args)
Parameters
Events
EntryAdded
Fired each time a new log entry has been added.
public event LogEntryDelegate EntryAdded