Skip to content

Is this not possible to have a log file? #368

Answered by gi0baro
lapinvert asked this question in Q&A
Discussion options

You must be logged in to vote

@lapinvert logging configuration in Granian follows the logging standard library configuration.
You just need to customise the default handlers to use files in place of the stdout.

You can put such configuration in a JSON file and point Granian to it using the --log-config CLI option, or, in case you run Granian from Python, define a dict for that and pass it to the Granian class using the log_dictconfig parameter (https://github.com/emmett-framework/granian/blob/master/granian/server.py#L89).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gi0baro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants