Merge pull request #125 from jimschubert/master
Allow for somewhat standard debugging calls
This commit is contained in:
commit
83271e47fc
@ -2,8 +2,11 @@ var fs = require('fs'),
|
||||
stream = require('stream'),
|
||||
util = require('util');
|
||||
|
||||
function debug(message) {
|
||||
// console.log(message);
|
||||
var debug;
|
||||
if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_DEBUG)) {
|
||||
debug = function(message) { console.error('LOG4JS: (BaseRollingFileStream) %s', message); };
|
||||
} else {
|
||||
debug = function() { };
|
||||
}
|
||||
|
||||
module.exports = BaseRollingFileStream;
|
||||
|
@ -6,8 +6,11 @@ var BaseRollingFileStream = require('./BaseRollingFileStream'),
|
||||
|
||||
module.exports = DateRollingFileStream;
|
||||
|
||||
function debug(message) {
|
||||
// console.log(message);
|
||||
var debug;
|
||||
if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_DEBUG)) {
|
||||
debug = function(message) { console.error('LOG4JS: (DateRollingFileStream) %s', message); };
|
||||
} else {
|
||||
debug = function() { };
|
||||
}
|
||||
|
||||
function DateRollingFileStream(filename, pattern, options, now) {
|
||||
|
@ -4,9 +4,11 @@ var BaseRollingFileStream = require('./BaseRollingFileStream'),
|
||||
fs = require('fs'),
|
||||
async = require('async');
|
||||
|
||||
function debug() {
|
||||
// util.debug(message);
|
||||
// console.log.apply(console, arguments);
|
||||
var debug;
|
||||
if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_DEBUG)) {
|
||||
debug = function(message) { console.error('LOG4JS: (RollingFileStream) %s', message); };
|
||||
} else {
|
||||
debug = function() { };
|
||||
}
|
||||
|
||||
module.exports = RollingFileStream;
|
||||
|
Loading…
Reference in New Issue
Block a user