# Logger

Colorful logger class used by Chariot.js internally featuring various log levels and colorful level dependent logging methods

# Constructor

The Chariot.Logger class only exposes static methods. An object instantiation isn't required.

# Methods

# success(title, body) Static

Log something related to being successful. Date and Title components get logged in bold green.

Parameter Type Optional Default Description
title String N/A The title of the success log enty
body String N/A The body of the success log enty
Returns: void Calling this method returns nothing.
Example:
Logger.success('SUCCESS Example', 'An example was successful!');
/* ⇨ [ 16.09.2019 12:34:56 ] [ SUCCESS Example ] An example was successful! */

# warning(title, body) Static

Log something related to a warning. Date and Title components get logged in bold orange.

Parameter Type Optional Default Description
title String N/A The title of the warning log enty
body String N/A The body of the warning log enty
Returns: void Calling this method returns nothing.
Example:
Logger.warning('WARNING Example', 'This is a warning!');
/* ⇨ [ 16.09.2019 12:34:56 ] [ WARNING Example ] This is a warning! */

# error(title, body) Static

Log something related to an error. Date and Title components get logged in bold red.

Parameter Type Optional Default Description
title String N/A The title of the error log enty
body String N/A The body of the error log enty
Returns: void Calling this method returns nothing.
Example:
Logger.error('ERROR Example', 'An example was unsuccessful!');
/* ⇨ [ 16.09.2019 12:34:56 ] [ ERROR Example ] An example was unsuccessful! */

# debug(title, body) Static

Log something related to debugging. Date and Title components get logged in bold magenta.

Parameter Type Optional Default Description
title String N/A The title of the debug log enty
body String N/A The body of the debug log enty
Returns: void Calling this method returns nothing.
Example:
Logger.debug('DEBUG Example', 'This is a debug log!');
/* ⇨ [ 16.09.2019 12:34:56 ] [ DEBUG Example ] This is a debug log! */

# command(body) Static

Log something related to command usage. Date and Title components get logged in bold green.

Parameter Type Optional Default Description
body String N/A The body of the log enty
Returns: void Calling this method returns nothing.
Example:
Logger.command('Someone used the help command!');
/* ⇨ [ 16.09.2019 12:34:56 ] [ COMMAND ] Someone used the help command! */

# event(body) Static

Log something related to a Discord event. Date and Title components get logged in bold orange.

Parameter Type Optional Default Description
body String N/A The body of the log enty
Returns: void Calling this method returns nothing.
Example:
Logger.event('Joined a new guild!');
/* ⇨ [ 16.09.2019 12:34:56 ] [ EVENT ] Joined a new guild! */