Skip to content

coralhq/node-chillog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-chillog

Node-Chillog implements stdout logging and loosely follow Gelf RFC. This has been modified based on our team needs. The notable changes are removal of emergency logging and timestamp in milliseconds.

Available Functions

  • chillog.alert
  • chillog.critical
  • chillog.error
  • chillog.notice
  • chillog.info
  • chillog.debug

Examples

Initialize with defaults

    var Chillog = require("node-chillog");
    var chillog = new Chillog()

Initialize with config

    var Chillog = require("node-chillog");
    var chillog = new Chillog({
      hostname: "log.creator.com"
    })

Short message logging

  logger.alert("alert... short message")

Short message and long message logging

  logger.critical("critical... short message", "critical... long message here. some backtraces stuff")

Short message logging with additional JSON data

  logger.error("error... short message", { user_id: 42 })

Short message and long message logging with additional JSON data

  logger.notice("notice... short message", "notice... long story short. you might need to notice this", { user_id: 42 })