Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogWriter synchronization problem #8

Open
GoogleCodeExporter opened this issue Oct 27, 2015 · 1 comment
Open

LogWriter synchronization problem #8

GoogleCodeExporter opened this issue Oct 27, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

In new 2.0 version, just as stated LogWriter is a channel, and a new go-routine 
is spawned to manage the printing.

But when a main program exited too quickly before that go-routine can finish 
processing the logs from channel, then these logs will be lost. Even 
logger.Close() won't resolve this.

Need some extra synchronization codes maybe, like embed a feedback channel 
inside the type LogWriter so logWriter.Close() can exam this channel and wait 
until all logs are printed.


Original issue reported on code.google.com by [email protected] on 22 Sep 2011 at 1:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant