Skip to content

Commit

Permalink
Loggers output all go to stderr. Closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiraux committed Jan 14, 2019
1 parent af62e58 commit badbaae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion agents/base_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (a *BaseAgent) Name() string { return a.name }
// All agents that embed this structure must call Init() as soon as their Run() method is called
func (a *BaseAgent) Init(name string, ODCID ConnectionID) {
a.name = name
a.Logger = log.New(os.Stdout, fmt.Sprintf("[%s/%s] ", hex.EncodeToString(ODCID), a.Name()), log.Lshortfile)
a.Logger = log.New(os.Stderr, fmt.Sprintf("[%s/%s] ", hex.EncodeToString(ODCID), a.Name()), log.Lshortfile)
a.Logger.Println("Agent started")
a.close = make(chan bool)
a.closed = make(chan bool)
Expand Down
2 changes: 1 addition & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func NewConnection(serverName string, version uint32, ALPN string, SCID []byte,
c.EncryptionLevelsAvailable = broadcast.NewBroadcaster(10)
c.FrameQueue = broadcast.NewBroadcaster(1000)

c.Logger = log.New(os.Stdout, fmt.Sprintf("[CID %s] ", hex.EncodeToString(c.OriginalDestinationCID)), log.Lshortfile)
c.Logger = log.New(os.Stderr, fmt.Sprintf("[CID %s] ", hex.EncodeToString(c.OriginalDestinationCID)), log.Lshortfile)

c.TransitionTo(version, ALPN)

Expand Down

0 comments on commit badbaae

Please sign in to comment.