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

SDK Logger does not flush logs to file unless Application is shutdown #616

Closed
dhaval24 opened this issue Mar 22, 2018 · 0 comments · Fixed by #618
Closed

SDK Logger does not flush logs to file unless Application is shutdown #616

dhaval24 opened this issue Mar 22, 2018 · 0 comments · Fixed by #618
Assignees
Milestone

Comments

@dhaval24
Copy link
Contributor

When using the InternalSdkLogger in "FILE" mode, it is unable to stream the logs to the file. The current implementation only writes to the file (i.e flushes the FileWritter when application is shut down). This behavior should be changed.

Instead users would like to see the logs flowing continuously, therefore it would make sense to flush() after every log statement is written to FileWriter.

This won't be CPU Intensive because by default we have already modified the behavior of the SDK to enable cold start (no logging except critical logAlways messages in case of disaster event).

PS: I would highly recommend moving to SLF4J. The current implementation of FileLogger tries to mimic RollingFileAppender in Log4j / Logback but is pretty nacent. This also doesn't provide users with the flexibility to redirect the logs to the desired single place. Ideally there is always a requirement to pump all the application logs to single location and our InternalLogger is a barrier for this.

@dhaval24 dhaval24 added this to the 2.0.2 milestone Mar 22, 2018
@dhaval24 dhaval24 self-assigned this Mar 22, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant