Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: rename trace-id to traceID in log pkg #26

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion log/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type actLogger struct {

func (l actLogger) Info(m Map) {
if !isOff.Load() {
m["trace-id"] = l.trcId
m["traceID"] = l.trcId
m["identifier"] = l.identifier
actZapLog.Info("", zap.Any("payload", m))
}
Expand Down
6 changes: 3 additions & 3 deletions log/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ type runLogger struct {
func (l runLogger) Info(m Map) {
if !isOff.Load() {
// add request id
m["trace-id"] = l.trcId
m["traceID"] = l.trcId
m["identifier"] = l.identifier
runZapLog.Info("", zap.Any("payload", m))
}
}
func (l runLogger) Warning(m Map) {
if !isOff.Load() {
// add request id
m["trace-id"] = l.trcId
m["traceID"] = l.trcId
m["identifier"] = l.identifier
runZapLog.Warn("", zap.Any("payload", m))
}
}
func (l runLogger) Error(m Map) {
if !isOff.Load() {
// add request id
m["trace-id"] = l.trcId
m["traceID"] = l.trcId
m["identifier"] = l.identifier
runZapLog.Error("", zap.Any("payload", m))
}
Expand Down
2 changes: 1 addition & 1 deletion log/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type wrkLogger struct {
func (l wrkLogger) Info(m Map) {
if !isOff.Load() {
// add request id
m["trace-id"] = l.trcId
m["traceID"] = l.trcId
m["identifier"] = l.identifier
wrkZapLog.Info("", zap.Any("payload", m))
}
Expand Down