NO LONGER MAINTAINED. THE LOGGER WAS MOVED TO https://github.com/T0ine34/gamuLogger
🏠 Main page | 🐍 Python | 🌐 Javascript
The goal of this module is to provide a simple, easy to use but powerful logging module for both python and javascript.
- Simple and easy to use (see examples below)
- Supports multiple log levels (DEEP_DEBUG, DEBUG, INFO, WARNING, ERROR, CRITICAL)
- Supports multiple log outputs (console, file) with separated level configuration
- Supports colors in console output
- Contain project modules features based on the current file (see examples below)
- Add decorators to log function calls (see examples below) (python only for now)
fromgamuLoggerimporterror, info, criticalerror("This is an error message")
info("This is an info message")
critical("This is a critical message")will output:
[ current datetime ] [ ERROR ] This is an error message
[ current datetime ] [ INFO ] This is an info message
[ current datetime ] [ CRITICAL ] This is a critical message
import{Logger,error,info,critical}from'@gamunetwork/logger';info("This is an info message before setting the module name");Logger.setModule('module_name');// set the module name, for this file onlyerror("This is an error message");info("This is an info message");critical("This is a critical message");will output:
[ current datetime ] [ INFO ] This is an info message before setting the module name
[ current datetime ] [ ERROR ] [ module_name ] This is an error message
[ current datetime ] [ INFO ] [ module_name ] This is an info message
[ current datetime ] [ CRITICAL ] [ module_name ] This is a critical message
a variant of this decorator named
@deep_debug_funcis also available. It will do the same thing, but will set it output to DEEP_DEBUG instead of DEBUG.
If you encounter any problem, please let us know by creating an issue here, on github !