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

Simplify logging and docs, and command line instructions #3955

Merged
merged 5 commits into from Jun 30, 2015

Conversation

benjaoming
Copy link
Contributor

Final amendment to #3601

@MCGallaspy I replaced NAIVE_LOGGING with a default log file that's just truncated every time you run kalite start. I think it matches the needs better on a production system.

I don't mind that it's there by default, because you'd have to have an incredible uptime and usage to make a significant impact on file size. Everything else will memory leak and die before this is an issue, and restarting kalite always truncates the log file.

In case there's a failure, normal users can refer to the log. I could add more interesting features that kept latest lines from a previous log, but on the other hand, I feel like we need to get a proper logging mechanism and not spend more time on this :)

@MCGallaspy
Copy link
Contributor

The changes look fine. I agree a proper logging mechanism is needed. I still think it should be disabled by default, unless we can show that the rate at which the logfile grows is super slow. I'm going to time it for a few minutes and see what happens.

open(SERVER_LOG, "w").truncate()
print("Going to daemon mode, logging to {0}".format(SERVER_LOG))
kwargs['out_log'] = SERVER_LOG
kwargs['err_log'] = SERVER_LOG

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

MCGallaspy added a commit that referenced this pull request Jun 30, 2015
Simplify logging and docs, and command line instructions
@MCGallaspy MCGallaspy merged commit b949f87 into learningequality:develop Jun 30, 2015
@MCGallaspy MCGallaspy removed the has PR label Jun 30, 2015
@benjaoming benjaoming deleted the fix-3601 branch July 1, 2015 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants