Notorious Puppy Memes

    @sdv/node-logger
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    Nodejs Logger

    Console, File, RabbitMQ

    Usage

    // main.js
    
    const loggerFactory = require('@sdv/node-logger');
    
    loggerFactory.init({
       "app": "App.Name",
       "level": "debug",
       "console": {
         "stderrLevels": [],
         "timestamp": true
       },
       "file": {
         "filename": "App.Name-%DATE%.log",
         "datePattern": "YYYY-MM-DD-HH",
         "dirname": "./logs",
         "zippedArchive": true,
         "maxSize": "20m",
         "maxFiles": "14d"
       },
       "rabbitmq": {
         "silent": false,
         "level": "debug",
         "host": "logger",
         "vhost": "logging",
         "login": "log",
         "password": "log",
         "exchange": {
           "name": "logging-exchange",
           "properties": {
             "type": "topic",
             "durable": true,
             "autoDelete": false
           }
         }
       },
       "transports": [ "console", "file", "rabbitmq" ]
     })
    // module.js
    
    const { logger } = require('@sdv/node-logger');
    
    logger.info('Hello world!');

    Keywords

    none

    Install

    npm i @sdv/node-logger

    DownloadsWeekly Downloads

    12

    Version

    2.0.0

    License

    none

    Unpacked Size

    4.08 kB

    Total Files

    5

    Last publish

    Collaborators

    • rkarabanov
    • 0xbadc0ffee
    • kuanyshevaidos
    • anton.sapozhnikau
    • sdv-front
    • s.solyanik
    • y.lanin
    • p.ratnikau
    • sdv.starodubenko
    • sdv-y.yakusevich
    • igorkulazhenko
    • m.v.bystrov
    • a.melnik