Table of Contents

Interface ILogger

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Interface to the client's and server's event, debug and error logging utilty.

public interface ILogger

Properties

TraceLog

If true, will also print to Diagnostics.Debug.

bool TraceLog { get; set; }

Property Value

bool

Methods

Audit(string)

Adds a new Audit log entry with the specified message.

void Audit(string message)

Parameters

message string

Audit(string, params object[])

Adds a new Audit log entry with the specified format string and arguments.

void Audit(string format, params object[] args)

Parameters

format string
args object[]

Build(string)

Adds a new Build log entry with the specified message.

void Build(string message)

Parameters

message string

Build(string, params object[])

Adds a new Build log entry with the specified format string and arguments.

void Build(string format, params object[] args)

Parameters

format string
args object[]

Chat(string)

Adds a new Chat log entry with the specified message.

void Chat(string message)

Parameters

message string

Chat(string, params object[])

Adds a new Chat log entry with the specified format string and arguments.

void Chat(string format, params object[] args)

Parameters

format string
args object[]

ClearWatchers()

Removes any handler that registered to the EntryAdded event. This method is called when the client leaves a world or server shuts down.

void ClearWatchers()

Debug(string)

Adds a new Debug log entry with the specified message.

void Debug(string message)

Parameters

message string

Debug(string, params object[])

Adds a new Debug log entry with the specified format string and arguments.

void Debug(string format, params object[] args)

Parameters

format string
args object[]

Error(Exception)

Convenience method for logging exceptions in try/catch blocks

void Error(Exception e)

Parameters

e Exception

Error(string)

Adds a new Error log entry with the specified message.

void Error(string message)

Parameters

message string

Error(string, params object[])

Adds a new Error log entry with the specified format string and arguments.

void Error(string format, params object[] args)

Parameters

format string
args object[]

Event(string)

Adds a new Event log entry with the specified message.

void Event(string message)

Parameters

message string

Event(string, params object[])

Adds a new Event log entry with the specified format string and arguments.

void Event(string format, params object[] args)

Parameters

format string
args object[]

Fatal(Exception)

Convenience method for logging exceptions in try/catch blocks

void Fatal(Exception e)

Parameters

e Exception

Fatal(string)

Adds a new Fatal log entry with the specified message.

void Fatal(string message)

Parameters

message string

Fatal(string, params object[])

Adds a new Fatal log entry with the specified format string and arguments.

void Fatal(string format, params object[] args)

Parameters

format string
args object[]

Log(EnumLogType, string)

Adds a new log entry with the specified log type and message.

void Log(EnumLogType logType, string message)

Parameters

logType EnumLogType
message string

Log(EnumLogType, string, params object[])

Adds a new log entry with the specified log type, format string and arguments.

void Log(EnumLogType logType, string format, params object[] args)

Parameters

logType EnumLogType
format string
args object[]

Notification(string)

Adds a new Notification log entry with the specified message.

void Notification(string message)

Parameters

message string

Notification(string, params object[])

Adds a new Notification log entry with the specified format string and arguments.

void Notification(string format, params object[] args)

Parameters

format string
args object[]

StoryEvent(string)

Adds a new StoryEvent log entry with the specified message.

void StoryEvent(string message)

Parameters

message string

StoryEvent(string, params object[])

Adds a new StoryEvent log entry with the specified format string and arguments.

void StoryEvent(string format, params object[] args)

Parameters

format string
args object[]

VerboseDebug(string)

Adds a new VerboseDebug log entry with the specified message.

void VerboseDebug(string message)

Parameters

message string

VerboseDebug(string, params object[])

Adds a new VerboseDebug log entry with the specified format string and arguments.

void VerboseDebug(string format, params object[] args)

Parameters

format string
args object[]

Warning(Exception)

Convenience method for logging exceptions in try/catch blocks

void Warning(Exception e)

Parameters

e Exception

Warning(string)

Adds a new Warning log entry with the specified message.

void Warning(string message)

Parameters

message string

Warning(string, params object[])

Adds a new Warning log entry with the specified format string and arguments.

void Warning(string format, params object[] args)

Parameters

format string
args object[]

Events

EntryAdded

Fired each time a new log entry has been added.

event LogEntryDelegate EntryAdded

Event Type

LogEntryDelegate