mirror of
https://gitee.com/johng/gf.git
synced 2024-11-29 18:57:44 +08:00
fix: fix lost log directory path for grapc log (#3387)
This commit is contained in:
parent
409041b965
commit
04756d05a7
@ -44,7 +44,7 @@ func (s *GrpcServer) handleAccessLog(
|
||||
"%s, %.3fms, %+v, %+v",
|
||||
info.FullMethod, float64(duration)/1e6, req, res,
|
||||
)
|
||||
s.config.Logger.Stdout(s.config.LogStdout).File(s.config.AccessLogPattern).Print(ctx, content)
|
||||
s.config.Logger.Stdout(s.config.LogStdout).File(s.config.AccessLogPattern).Path(s.config.LogPath).Print(ctx, content)
|
||||
}
|
||||
|
||||
// handleErrorLog handles the error logging for server.
|
||||
@ -85,5 +85,5 @@ func (s *GrpcServer) handleErrorLog(
|
||||
}
|
||||
s.config.Logger.Stack(false).
|
||||
Stdout(s.config.LogStdout).
|
||||
File(s.config.ErrorLogPattern).Error(ctx, content)
|
||||
File(s.config.ErrorLogPattern).Path(s.config.LogPath).Error(ctx, content)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user