// GrpcServerConfig is the configuration for server.
type GrpcServerConfig struct {
Address string // (optional) Address for server listening.
Name string // (optional) Name for current service.
Logger *glog.Logger // (optional) Logger for server.
LogPath string // (optional) LogPath specifies the directory for storing logging files.
LogStdout bool // (optional) LogStdout specifies whether printing logging content to stdout.
ErrorStack bool // (optional) ErrorStack specifies whether logging stack information when error.
ErrorLogEnabled bool // (optional) ErrorLogEnabled enables error logging content to files.
ErrorLogPattern string // (optional) ErrorLogPattern specifies the error log file pattern like: error-{Ymd}.log
AccessLogEnabled bool // (optional) AccessLogEnabled enables access logging content to file.
AccessLogPattern string // (optional) AccessLogPattern specifies the error log file pattern like: access-{Ymd}.log
}
4 Comments
yidashi
这个日志不生效啊,访问日志和错误日志都不会记录,是我哪里操作不对吗,应该不是啊
yidashi
debug了一下确实是有bug的,配置的日志path不生效,grpc里的logger是glog.New()生成的,不读配置。
这grpc配置里边的logPath更别说了,框架压根不读取这个配置。。令人发指
gf版本2.5.1
5分钟后升级到2.5.6依然如此
郭强
yidashi 问题请提
issue
或者pr
到github
主库。王仁义
logPath
配置存在 bug,该 bug 于新版(gf > 2.6.4)
中修复