mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 06:15:51 +00:00
fix: get ctx logger on new request (#198)
* fix: get ctx logger on new request * chore: change log format * fix: get ctx logger on new request
This commit is contained in:
parent
cc97550f80
commit
2aea4a7a51
@ -65,6 +65,7 @@ func (pxy *Proxy) Start(ctx context.Context) {
|
||||
|
||||
go func() {
|
||||
ctx := util.GetCtxWithTraceId(ctx)
|
||||
logger := log.GetCtxLogger(ctx)
|
||||
|
||||
pkt, err := packet.ReadHttpRequest(conn)
|
||||
if err != nil {
|
||||
|
@ -23,8 +23,8 @@ func GetCtxLogger(ctx context.Context) zerolog.Logger {
|
||||
|
||||
func InitLogger(cfg *util.Config) {
|
||||
partsOrder := []string{
|
||||
zerolog.TimestampFieldName,
|
||||
zerolog.LevelFieldName,
|
||||
zerolog.TimestampFieldName,
|
||||
traceIdFieldName,
|
||||
scopeFieldName,
|
||||
zerolog.MessageFieldName,
|
||||
|
Loading…
Reference in New Issue
Block a user