Class: Logger
Beta
The logger class is a utility class which allows editor extensions to communicate with the player from the server to the client log window. The logger class presents 4 different output channels which can be used to send information to the client/player, depending on the context of the information.
Methods
debug()
debug(
message,properties?):void
World Mutation Beta
Parameters
message
string | LocalizationEntry
The message string to send to the log window
properties?
Returns
void
Remarks
A debug output channel generally used during the
development process of editor extensions. This channel
defaults to hidden in the log window (unless explicitly
enabled).
Once your editor extension development process is complete,
and you're ready to ship/share your extension - we generally
recommend that you remove any references to this log channel
to avoid a noisy experience for other users
Throws
This function can throw errors.
error()
error(
message,properties?):void
World Mutation Beta
Parameters
message
string | LocalizationEntry
The message string to send to the log window
properties?
Returns
void
Remarks
The error channel is generally used when the editor extension experiences an error (either a program error in executing logic unexpectedly, or an error in the input or output to/from a player). Use this channel sparingly - it's meant to communicate important problems to the player
Throws
This function can throw errors.
info()
info(
message,properties?):void
World Mutation Beta
Parameters
message
string | LocalizationEntry
The message string to send to the log window
properties?
Returns
void
Remarks
The info channel is intended to communicate general, non-fatal or non-erroneous information to the player that can generally be safely ignored if they choose to do so.
Throws
This function can throw errors.
warning()
warning(
message,properties?):void
World Mutation Beta
Parameters
message
string | LocalizationEntry
The message string to send to the log window
properties?
Returns
void
Remarks
The warning channel is intended to inform the user of "potential" issues (missing inputs, values out of range, things that cannot be found) but are not fatal and execution can still be completed.
Throws
This function can throw errors.
