Commit 6c1fcbec authored by huhao's avatar huhao

修复location为空的bug

parent 9c2eeb66
......@@ -14,7 +14,7 @@ function location(loggingEvent) {
if (loggingEvent.callStack) {
return `${loggingEvent.categoryName} ${loggingEvent.functionName}(${loggingEvent.fileName}:${loggingEvent.lineNumber}:${loggingEvent.columnNumber})`;
}
return loggingEvent.categoryName === 'default' ? undefined : loggingEvent.categoryName;
return loggingEvent.categoryName || '';
}
function time(loggingEvent, timeFormat, timezoneOffset) {
......@@ -35,7 +35,7 @@ module.exports.configure = function (config, layouts) {
const layout = config.layout ?
layouts.layout(config.layout.type, config.layout) :
layouts.layout;
const timeFormat = config.timeFormat || dateFormat.ISO8601_WITH_TZ_OFFSET_FORMAT;
const timeFormat = config.timeFormat || 'yyyy-MM-ddThh:mmO';
const sls = new ALY.SLS(config);
const { projectName, logStoreName, topic } = config;
......
{
"name": "log4js-aliyun-sls",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"main": "index.js",
"scripts": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment