Skip to content
Documentation
Packages
cerebro
Toolboxes
Logger

Logger

Features for allowing you to log to the console.

You can access these tools on the cerebro toolbox.

clear
Permalink for this section

This clears the console window.


toolbox.logger.clear();

critical
Permalink for this section

Prints a critical message.


toolbox.logger.critical("Your system does not have Yarn installed.");

error
Permalink for this section

Prints an error message. Use this when something goes Pants-On-Head wrong. What does that mean? Well, if your next line of code isn't process.exit(0), then it was probably a warning.


toolbox.logger.error("Out of disk space.");

danger
Permalink for this section

@todo write doc

success
Permalink for this section

Print a "something good just happened" message.


toolbox.logger.success("We did it!");

warning
Permalink for this section

Prints a warning message. Use this when you feel a disturbance in the force.


toolbox.logger.warning("Your system does not have Yarn installed. It's awesome.");

info
Permalink for this section

Prints an informational message. Use this as your goto.


toolbox.logger.info("Hello. I am a chatty plugin.");

debug
Permalink for this section

Only used for debugging your plugins. You can pass this function a string or an object.


toolbox.logger.debug(someObject, "download status");

The message parameter is object you would like to see.

The label is an optional label on a message which is handy if you've got a lot of debug messages, and you're losing track of which one is which.

The showIcon shows an icon before the message and label.

log
Permalink for this section

@todo write doc

status
Permalink for this section

@todo write doc

notice
Permalink for this section

@todo write doc

note
Permalink for this section

@todo write doc

line
Permalink for this section

@todo write doc

center
Permalink for this section

@todo write doc