Nebulous Pumpkin Moons

    pino-redis

    1.0.3 • Public • Published

    pino-redis  npm version

    Load pino logs into Redis.

    Install

    npm install pino-redis
    

    Usage

    Write logs into redis

    node my-app.js | pino-redis [options]
    
    var pinoRedis = require('pino-redis')({
        connectionUrl: `your redis connection url`
    })
     
    var pino   = require('pino')
    var logger = pino(pinoRedis)
     
    var message = 'load pino logs into redis',
        meta = {ttl: 60, key: 'redis:pino', child: 'logger'}
     
    logger.info(meta, message)
     

    Options

    Usage: pino-redis [options]
    
      Load pino logs into Redis
    
      Options:
    
        -h, --help                      output usage information
        -V, --version                   output the version number
        -U, --connectionUrl <url>       redis connection url
    

    .pino([meta], message)

    Parameters:

    • meta (object)
      • key (string): Required. Key will hold the string value.
      • ttl (number): Set key to timeout after a given number of seconds. Default 60
      • gzip (boolean): Use gzip to compress before log into redis. Default false

    License

    Licensed under MIT.

    Install

    npm i pino-redis

    DownloadsWeekly Downloads

    37

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • buianhthang