@knfs-tech/bamimi-log
v1.0.1
Published
Log module
Downloads
61
Readme
This is a package that helps you log with level fatal,error, warn, info, debug, trace, all
Install
npm i @knfs-tech/bamimi-log
#or
yarn add @knfs-tech/bamimi-log
Usage
const Logger = require("@knfs-tech/bamimi-log")
new Logger("test log")
//console.info (info)
//console.debug (debug)
//console.trace (trace)
//console.log (all)
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: info,
* value: 3
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: debug,
* value: 4
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: trace,
* value: 5
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: all,
* value: 6
* },
* message: "test log"
* }
*/
new Logger("test log", "error")
//console.error (error)
//console.error (warn)
//console.info (info)
//console.debug (debug)
//console.trace (trace)
//console.log (all)
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: error,
* value: 1
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: warn,
* value: 2
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: info,
* value: 3
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: debug,
* value: 4
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: trace,
* value: 5
* },
* message: "test log"
* }
*/
/**
* {
* timestamp: "2024-09-11T15:27:30+00:00",
* level: {
* key: all,
* value: 6
* },
* message: "test log"
* }
*/
Author
Owner
License
Bamimi is open-sourced software licensed under the MIT license.