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

Logfile rotation and configurable log format #1411

Closed
wants to merge 11 commits into from

Conversation

xkosubek
Copy link
Contributor

@xkosubek xkosubek commented Nov 28, 2023

Overview

  • Added configurable log and date format
  • Added support for logfile rotation
  • Updated documentation

Related Issue / Discussion

fixes #1389
fixes #1388

Contributions and Licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution.
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@xkosubek xkosubek changed the title Logging Logfile rotation and configurable log format Nov 28, 2023
logging:
logfile: /path/to/pygeoapi.log # the full file path to the logfile
rotation:
mode: # [None|time|size]
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently if the mode is set to null in yaml, which would correspond to python None, this would lead to an exception because it would be detected as an unknown mode.

I think the code is fine though, and we could require here in the documentation that mode must only be time|size. If someone doesn't want log rotation, they can just not have the whole rotation block.

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 this pull request may close these issues.

Logfile rotation Configurable log format
3 participants