Logs message with ‘debug’ as severity level.
This should be used for debug-purposes only. Messages will be ignored if environment is set to production.
Logs message with ‘error’ as severity level.
This should be used if a critical error that needs too be looked at occurs.
The application must be able to recover, and unrelated data-loss should not happen when using this.
Logs message with ‘fatal’ as severity level.
This should be used if an unrecoverable error occurs, that leaves the application with no choice but to shut down.
Closes the sender, and publishes remaining logs before closing the publish loop.
You should call this before your application completes/returns so that no logs are lost.
Sets up the log service. Call this before calling the log:: functions.
To prevent loss of logs on application shutdown, make sure call log::flush() before the fact.
Logs message with ‘warning’ as severity level.
This should be used if an error or issue occurs that may may have to be looked at,
but is unimportant for application logic’s continuous success.