Skip to content

API Reference

Thev2Andy edited this page Jan 19, 2022 · 11 revisions

Logger Class API

The class used for writing logs.

• Methods

Logger.Log Method

• Definition

Calls a log, sent over to the OnLog event, and saves it in a log file. (optional)

public static void Log(string LogMessage, LogType MessageType, bool Timestamp, object LogSender)

• Parameters

LogMessage string

The message of the log.


MessageType LogType

The type of the log.


Timestamp bool

Timestamp this log in the file?


LogSender object

The sender of the log. (Only used when passing the reference to LogEventArgs)



Fields

Logger.OnLog EventHandler<LogEventArgs>

public static event EventHandler<LogEventArgs> OnLog;

Invoked on Log() call.


Logger.WriteInLogFile boolean

public static bool WriteInLogFile = true;

Toggle writing logs to a file, stored next to the caller assembly.



LogEventArgs Class API

Log Event Arguments holder.

Fields

LogMessage string

• Definition

The message of the log.

public string LogMessage;

MessageType LogType

• Definition

The type of the log.

public LogType MessageType;

LogTime DateTime

• Definition

The time the log was sent at.

public DateTime LogTime;

Timestamped bool

• Definition

Is the log timestamped?

public bool Timestamped;

LogSender object

• Definition

The sender of the log.

public object LogSender;

Clone this wiki locally