Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

server.go logging to stdout #7

Closed
udhos opened this issue Nov 29, 2016 · 4 comments
Closed

server.go logging to stdout #7

udhos opened this issue Nov 29, 2016 · 4 comments

Comments

@udhos
Copy link

udhos commented Nov 29, 2016

server.go has two calls to log.Println().

Shouldn't such a direct logging to stdout be prevented?

@icza
Copy link
Owner

icza commented Nov 29, 2016

As of 2016-11-27, development of Gowut has been moved to the dev branch of the gowut project: https://github.com/icza/gowut/tree/dev

Maybe, I don't know. It never bothered me, and I appreciated the logs on console. You're the first to "vote" against it.

@udhos
Copy link
Author

udhos commented Nov 29, 2016

Well, I am unsure as well.

Thing is, I am using server.SetLogger(fileLogger) in order to redirect my app logs to a file, but it keeps issuing "session created/removed" to console. Since those messages are correctly sent to the logger as well, I don't see it as a defect, only as an unexpected behavior.

@icza
Copy link
Owner

icza commented Nov 29, 2016

Maybe the correct thing would be to check if a logger is set, log only using that. If no logger set, then use log.Println().

@icza
Copy link
Owner

icza commented Nov 29, 2016

Changed the behavior. Commit: icza/gowut@befebd1

In the future, please open issues at the gowut project.

@icza icza closed this as completed Nov 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants