From 0199acf956cabe3bac464a855245119ea6f629ac Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Sat, 18 Apr 2020 12:19:43 +0200 Subject: [PATCH] docs(adonis): logger methods --- backend/adonis.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/backend/adonis.js b/backend/adonis.js index 54e7a2b..60d91c8 100644 --- a/backend/adonis.js +++ b/backend/adonis.js @@ -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