Comparing version 0.0.1 to 0.0.2
@@ -0,1 +1,12 @@ | ||
/** | ||
* properties that can be set are as follows | ||
* | ||
* fileLocation (required) - the path to where the log files should be written too | ||
* appName (optional) - this is to help distinguish between different app logs - this will be more useful when feather is able to write to system-wide logs via syslog or rsyslog | ||
* timestampFormat (optional / recommend using) - this is the date format appearing in the log file. The one used here is apache style and is widely used. | ||
* dateFormat (required) - this is how the file name will appear as feather uses this to create the file name. Again, this conforms with current convention so I recommend not changing it | ||
* host (optional) - this is the host and again it will be useful when feather writes to system log facilities such as syslog | ||
* rootLevel (optional) - if set then only logs up to that level will be logged, others will be ignored. | ||
*/ | ||
module.exports = { | ||
@@ -7,3 +18,3 @@ "fileLocation": "logs/feather/", | ||
"host" : '172.0.0.1', | ||
"rootLevel" : "Info" | ||
"rootLevel" : "Warn" | ||
} |
@@ -29,3 +29,2 @@ require('datejs'); | ||
var getHighestLevelToLogToo = function(callback) { | ||
var rootLevel = config.rootLevel; | ||
@@ -38,2 +37,8 @@ if (rootLevel) { | ||
}); | ||
} else { // log everything | ||
Object.keys(levels.alertLevels).forEach(function(key) { | ||
if(levels.alertLevels[key].toLowerCase() === "debug") { | ||
callback(null, key); | ||
} | ||
}) | ||
} | ||
@@ -107,6 +112,11 @@ } | ||
//TODO IMPORTANT - Need to allow for aSync calls which is managed by creating new instance of caller - however, need to throttle access to the log file as all processes log to same log file. | ||
//TODO TCP connection to syslog | ||
//TODO udp connection to syslog | ||
//TODO Create the required log directories if required | ||
//TODO logger.start() and logger.stop() | ||
/** | ||
* Tackle the following in order | ||
*/ | ||
//TODO - Create directories as required [DONE] | ||
//TODO - to read configuration from app level conf file. | ||
//TODO - Branch and rename to featherLog | ||
//TODO - allow log file locking so that one process can write to it at any one time. ~ careful that it does not slow things down though | ||
//TODO - start() stop() to yield time between the two | ||
//TODO - TCP / UDP connection |
{ | ||
"name":"feather", | ||
"version":"0.0.1", | ||
"version":"0.0.2", | ||
"keywords": ["logger", "lightweight", "Unix style logging", "info debug warn"], | ||
@@ -8,2 +8,5 @@ "engines": { "node": "*"}, | ||
"author": {"name" :"Viktor Trako", "email": "viktor.trako@holidayextras.com", "url": "http://www.holidayextras.com"}, | ||
"time" : { | ||
"0.0.1" : "2011-10-29T19:27:53.354Z" | ||
}, | ||
"repository": { "type": "git", "url": "git@github.com:holidayextras/feather.git"}, | ||
@@ -10,0 +13,0 @@ "dependencies":{ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40723
18
186