Système de log pour Node JS
Go to file
2024-01-13 16:09:29 +01:00
.gitignore Version 1.1.0 - Change all methods 2023-09-23 10:53:38 +02:00
basics.js Version 1.2.0 - Adding ReadMe 2023-10-21 17:23:33 +02:00
main.js Add Loguix 2024-01-13 16:09:29 +01:00
package.json Add Loguix 2024-01-13 16:09:29 +01:00
README.md Add Loguix 2024-01-13 16:09:29 +01:00

Loguix

Loguix est un petit package qui permet de générer des logs formatés : [YYYY-MM-DD-hh-mm-ss]

Utilisation

  • Dès que vous instanciez le package, configurez une seul fois le dossier de destination des logs
const log = require("loguix")
log.setup("./logs")

Fonctions principales

const MyLogSection = new LogType("Mon nom de section")

// Affiche une information
MyLogSection.log('.....')

// Affiche un avertissement
MyLogSection.warn('.....')

// Affiche une erreur
MyLogSection.error('.....')

Etapes (Steps)

const MyLogSection = new LogType("Mon nom de section")

// Affiche une information
MyLogSection.step.init('identifiant', ".....")

// Affiche un avertissement
MyLogSection.step.end('identifiant')

// Affiche une erreur
MyLogSection.step.error('identifiant', "Descritpion de l'erreur")