2014-01-11 04:18:16 +08:00
|
|
|
//Note that loggly appender needs node-loggly to work.
|
|
|
|
//If you haven't got node-loggly installed, you'll get cryptic
|
|
|
|
//"cannot find module" errors when using the loggly appender
|
2014-01-11 04:51:08 +08:00
|
|
|
var log4js = require('../lib/log4js');
|
|
|
|
|
2014-01-11 04:18:16 +08:00
|
|
|
log4js.configure({
|
|
|
|
"appenders": [
|
|
|
|
{
|
|
|
|
type: "console",
|
|
|
|
category: "test"
|
|
|
|
},
|
|
|
|
{
|
2014-01-11 04:51:08 +08:00
|
|
|
"type" : "loggly",
|
|
|
|
"token" : "12345678901234567890",
|
2014-01-11 04:18:16 +08:00
|
|
|
"subdomain": "your-subdomain",
|
2014-01-11 04:51:08 +08:00
|
|
|
"tags" : ["test"],
|
|
|
|
"category" : "loggly"
|
2014-01-11 04:18:16 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
2014-01-11 04:51:08 +08:00
|
|
|
var logger = log4js.getLogger("loggly");
|
2014-01-11 04:18:16 +08:00
|
|
|
logger.info("Test log message");
|
2014-01-11 04:51:08 +08:00
|
|
|
//logger.debug("Test log message");
|