golang/glog FR: MoveStandardLogTo

57 views
Skip to first unread message

dily...@mux.com

unread,
Dec 20, 2019, 2:01:52 PM12/20/19
to golang-nuts
Hi All,

I was wondering if something like MoveStandardLogTo could be added to golang/glog package in addition to CopyStandardLogTo that would NOT also emit redirected log on stderr. Currently when I try to DIY it via log.SetOutput I get header nesting like so (which is slightly annoying):

I1220 10:53:17.471917   94554 main.go:20] 2019/12/20 10:53:17 test log print

I can prepare a patch if maintainers are OK with this change.

Thanks,
-Dmitry

dily...@mux.com

unread,
Dec 20, 2019, 4:44:39 PM12/20/19
to golang-nuts
Actually I realized I can get the behavior I want using log.SetOutput and glog.InfoDepth(3, ...) + some original log parsing but it'd be nice to have something built-in in glog.
Reply all
Reply to author
Forward
0 new messages