log4cxx
v0.1.0
Published
log4cxx wrapper for Node.js
Downloads
10
Readme
node-log4cxx
This is a log4cxx wrapper for working with Node.js. If your Node.js application has a native addon which has already included log4cxx for logging, you will find this module really useful to unify the logging system and simplify the configuration.
Prerequisites
Node.js 4.x/5.x
C++11 compiler
npm install -g node-gyp- OS X:
brew install log4cxx - Ubuntu:
sudo aptitude install liblog4cxx-dev
- OS X:
Install
- From NPM:
npm install log4cxx --save
Brief introduction
This module exports a Logger function as object constructor, as well as Logger._. Internally, Logger uses Logger._ to accompany with liblog4cxx. However, Logger is better for formatting objects, whilst Logger._ is better in efficiency. BTW, Logger._ is almost the same as [email protected] module.
Read liblog4cxx usage for configuration details. See test.js for sample code.
Quick start
- Prepare a
log4cxx.propertiesfile, as sample
'use strict';
var log = new (require('log4cxx'))('demo');
log.info('Hello World');License
Apache 2.0

