mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-12-22 01:58:54 +00:00
docs(adonis): logger methods
This commit is contained in:
parent
b52da9aa7e
commit
0199acf956
@ -281,6 +281,26 @@ Event.listenersCount(event) // Return the number of listeners for a g
|
||||
Event.getListeners(event) // Return an array of listeners for a given event.
|
||||
Event.hasListeners(event) // Return a boolean indicating whether there are any listeners for a given event.
|
||||
|
||||
/********************************************************************************************
|
||||
* LOGGER
|
||||
* https://adonisjs.com/docs/sessions
|
||||
********************************************************************************************/
|
||||
|
||||
const Logger = use('Logger')
|
||||
|
||||
Logger.level = 'debug' // Sed default config level
|
||||
|
||||
Logger.emerg(msg, …data) // Print an emergency log (level 0).
|
||||
Logger.alert(msg, …data) // Print an alert log (level 1).
|
||||
Logger.crit(msg, …data) // Print a critical log (level 2).
|
||||
Logger.error(msg, …data) // Print an error log (level 3).
|
||||
Logger.warning(msg, …data) // Print a warning log (level 4).
|
||||
Logger.notice(msg, …data) // Print a notice log (level 5).
|
||||
Logger.info(msg, …data) // Print an info log (level 6).
|
||||
Logger.debug(msg, …data) // Print a debug log (level 7).
|
||||
|
||||
Logger.transport(transport) // Switch transport on the fly.
|
||||
|
||||
/********************************************************************************************
|
||||
* SESSIONS
|
||||
* https://adonisjs.com/docs/sessions
|
||||
|
Loading…
Reference in New Issue
Block a user