NodeWorld

NWLogger

La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.

csharp
public sealed class NWLogger : INWLogger

Namespace NodeWorld.Core.

Default INWLogger implementation backed by UnityEngine.Debug. Shared between client and server builds.

Constructors

NWLogger

csharp
public NWLogger(string context = "General")

A logger whose lines start with [context].

Properties

IsInfoEnabled

csharp
public bool IsInfoEnabled { get; }

Info lines are written in every build (the game is in development).

IsDebugEnabled

csharp
public bool IsDebugEnabled { get; }

Debug lines are written in the editor and in development builds.

Methods

Debug

csharp
public void Debug(string message)

Writes a debug line.

Info

csharp
public void Info(string message)

Writes an info line.

Warn

csharp
public void Warn(string message)

Writes a warning.

Error

csharp
public void Error(string message)

Writes an error.

csharp
public void Error(string message, Exception exception)

Writes an error with its exception.

WithContext

csharp
public INWLogger WithContext(string context)

A logger with another context.