1.0.5 • Published 7 years ago

log4js-aliyun-webtracking v1.0.5

Weekly downloads
6
License
MIT
Repository
-
Last release
7 years ago

#Send log via HTTP GET

#Configuration

/config/logTest.json

"appenders": {
  "type": "log4js-aliyun-log",
  "layout": {
    "type": "pattern",
    "pattern": "%p %c %m"
  },
  "host":"cn-hangzhou.sls.aliyuncs.com",
  "slsProject":"porjectname",
  "logStoreName":"logStoreName",
  "topic":"",
  "category": "test"
}

=================================================================================

log4js-aliyun-log

This is a aliyun simple log service appender for log4js.

#Installation

npm install log4js-aliyun-log --save

#Configuration

/config/logTest.json

"appenders": {
  "type": "log4js-aliyun-log",
  "layout": {
    "type": "pattern",
    "pattern": "%p %c %m"
  },
  "aliyunKey":"aliyunKey",
  "aliyunSecret":"aliyunSecrect",
  "endpoint":"http://cn-hangzhou.sls.aliyuncs.com",
  "slsProject":"porjectname",
  "logStoreName":"logStoreName",
  "topic":"",
  "category": "test"
}

most configure option is setting for aliyun sdk's js.

#Code example:

var log4js = require('log4js');
log4js.configure("./config/logTest.json");
var logger=log4js.getLogger("test");
logger.info("hello");
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago