Skip to content

Commit

Permalink
Fix glog logger conflict (#1310)
Browse files Browse the repository at this point in the history
* moving glog flag parsing to start of the agent to avoid conflict of loggers
  • Loading branch information
Charly Fontaine authored and JulienBalestra committed Feb 21, 2018
1 parent 324cf18 commit 3fa016c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,7 @@ func (le *LeaderEngine) IsLeader() bool {
func init() {
// Avoid logging glog from the k8s.io package
flag.Lookup("stderrthreshold").Value.Set("FATAL")
flag.Parse()
//Convinces goflags that we have called Parse() to avoid noisy logs.
//OSS Issue: kubernetes/kubernetes#17162.
flag.CommandLine.Parse([]string{})
}
5 changes: 5 additions & 0 deletions releasenotes/notes/fix-logger-glog-80cfbb7958da4c64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Fix the command-line flag parsing regression caused by a transitive dependency importing the
glog library. `agent` flags should now behave as in beta9.

0 comments on commit 3fa016c

Please sign in to comment.