Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Logging to file #21

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

SoerenHoffstedt
Copy link
Contributor

Added the ability to log to files. This is an additional logging channel, so stream and memory logging stay separate and work as before. Parameters for file logging can be set in the config.

If preferred I could also change this and incorporate the file logging into stream logging. This would need a few if-else blocks in the HTTPService, so that the file logging is not turned off in between executing different services.

I added debug log calls for the start and end of fcgi threads, including the threads ID. The execution of services and the users id are logged.

src/util/log.cpp Outdated
bf::create_directory(path);
}
path /= file_name.str();
filelog_stream.open(path.string());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check if the stream creation was successful using filelog_stream.fail()

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

Successfully merging this pull request may close these issues.

2 participants