程序不摸黑前进!
TODO
👉 对接后端全链路跟踪;
事件有丢失;
单元测试未补全;
代码优化;
对接示例
npm install --save @qianmi/log4js-Kafka-appender --registry=http://registry.npm.qianmi.com
然后在log4js-config.json中追加appender
log4js-config.json 文件;
{
"appenders": [
{
"type": "@qianmi/logservice-node",
"appName":"xSite",
"logType":"APP_LOG",
"logLevel":"INFO",
"kafkaConfig":{
"servers":"172.21.4.62:9092",
"topic":"LOGSTASH_APP_LOG"
}
},{
"type": "console"
}
],
"logLevel":"INFO"
}
其他
参考: