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

No way to turn off logging in ClientHandlerThread? #684

Open
efpies opened this issue Mar 15, 2021 · 0 comments
Open

No way to turn off logging in ClientHandlerThread? #684

efpies opened this issue Mar 15, 2021 · 0 comments

Comments

@efpies
Copy link

efpies commented Mar 15, 2021

Today we've experienced an issue regarding inability to create new files on server. Turned out, the log directory was filled with literal millions of files (half of which were empty). And the code on server was running for just 3 weeks.

And the reason for that is this piece of code:

string debugLogFilePath = "log";
if (settingsDict.Has(SessionSettings.DEBUG_FILE_LOG_PATH))
    debugLogFilePath = settingsDict.GetString(SessionSettings.DEBUG_FILE_LOG_PATH);
else if (settingsDict.Has(SessionSettings.FILE_LOG_PATH))
    debugLogFilePath = settingsDict.GetString(SessionSettings.FILE_LOG_PATH);

// FIXME - do something more flexible than hardcoding a filelog
log_ = new FileLog(debugLogFilePath, new SessionID(
        "ClientHandlerThread", clientId.ToString(), "Debug-" + Guid.NewGuid().ToString()));

So it seems, we'll always write debug logs, even in production. There should be a way to turn it off without commenting the code.

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

Successfully merging a pull request may close this issue.

1 participant