Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
log4js-aliyun-sls
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Metrics
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
yitong-public
log4js-aliyun-sls
Commits
6c1fcbec
Commit
6c1fcbec
authored
May 07, 2020
by
huhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复location为空的bug
parent
9c2eeb66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
aliyun-sls-appender.js
aliyun-sls-appender.js
+2
-2
package.json
package.json
+1
-1
No files found.
aliyun-sls-appender.js
View file @
6c1fcbec
...
...
@@ -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
;
...
...
package.json
View file @
6c1fcbec
{
"name"
:
"log4js-aliyun-sls"
,
"version"
:
"1.0.
0
"
,
"version"
:
"1.0.
1
"
,
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment