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

feat: add Python official Logging rotating handlers support #6167

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

Conversation

Janus-Xu
Copy link

Goals:

  • feat: extend jina JinaLogger supported handlers :TimedRotatingFileHandler:
    Python official Logging TimedRotatingFileHandler Usage

    log.json.yml
    eg:

    handlers:
      - TimedRotatingFileHandler
    level: INFO
    configs:
      TimedRotatingFileHandler:
        filename: './logs/myapp_timed.log'
        when: midnight
        interval: 1
        backupCount: 90
        encoding: utf-8
        formatter: JsonFormatter
  • feat: extend jina JinaLogger supported handlers :RotatingFileHandler:
    Python official Logging RotatingFileHandler Usage

    log.json.yml
    eg:

    handlers:
      - RotatingFileHandler
    level: INFO
    configs:
      RotatingFileHandler:
        filename: './logs/myapp_rotating.log'
        maxBytes: 20000000  # 20MB
        backupCount: 10
        encoding: utf-8
        formatter: JsonFormatter

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.

None yet

2 participants