Logger
Namespace Mc.Scripting · Kind class (sealed)
public sealed class LoggerWrites to the server log (native logger), prefixed with the plugin name.
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
Logger(string name) |
Creates a logger that prefixes [name]. |
Constructor
Section titled “Constructor”public Logger(string name)Creates a logger that prefixes [name].
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
Methods
Section titled “Methods”| Member | Description |
|---|---|
void Debug(string message) |
Writes a debug message. |
void Error(string message) |
Writes an error. |
void Error(string message, Exception exception) |
Writes an error with the exception and its stack trace. |
void Info(string message) |
Writes an info message. |
void Trace(string message) |
Writes a trace message. |
void Warn(string message) |
Writes a warning. |
void Write(LogLevel level, string message) |
Writes a message at level. |
public void Debug(string message)Writes a debug message.
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
public void Error(string message)Writes an error.
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
public void Error(string message, Exception exception)Writes an error with the exception and its stack trace.
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
|
exception |
Exception |
public void Info(string message)Writes an info message.
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
public void Trace(string message)Writes a trace message.
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
public void Warn(string message)Writes a warning.
Parameters
| Name | Type | Description |
|---|---|---|
message |
string |
public void Write(LogLevel level, string message)Writes a message at level.
Parameters
| Name | Type | Description |
|---|---|---|
level |
LogLevel |
|
message |
string |