Skip to main content

Package for rotating logger

Project description

Python Rotate Native Logger


Maintainer
email andriyunantoreza@gmail.com

Requirement:

  • Python 3.xx

How it work?

  1. Initialize once this function

    native_logger.configure_rotating_logger('generator')
    
    Param . . Default value
    logger_name mandatory name of logger, so you can access it from anywhere with specific logger name
    debug optional debug used for debugging purpose, if you want write logger.info on file, you can enable debug False
    backup_count optional how many backup count that you want 14
    hour optional hour (0-23) when log change to next file rotate 3
    interval optional interval day you want to backup 1
  2. Use everywhere

    Remember name of logger that you initialize, in this case I initialize using name generator and get the logger

    generator_logger = logging.getLogger('generator')
    generator_logger.warning('This is warning logger')
    
  3. Check your log in log folder

    Note:

     1. Make sure you have permission to create folder log
     2. debug.info is not write on file, set debug to True if you want it
     3. Have fun!
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rotate-logger-1.0.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rotate_logger-1.0.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file rotate-logger-1.0.0.tar.gz.

File metadata

  • Download URL: rotate-logger-1.0.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

File hashes

Hashes for rotate-logger-1.0.0.tar.gz
Algorithm Hash digest
SHA256 213a5a349c295edf3d6b774b357c6038878f9e274889f3a269b553ca5dd306f3
MD5 873fd1fd3b55d8d62a8a05cbece91968
BLAKE2b-256 3bc9ce1e16fbf212f2580f4f6685df8112b1a7d266f73bf2dc2116e976ef752c

See more details on using hashes here.

File details

Details for the file rotate_logger-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rotate_logger-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

File hashes

Hashes for rotate_logger-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 158f65f34254136ddcd4b610cb5bc2f74168b54a11beba79bd74fe5d836e0a5b
MD5 abf955f88496432127a285d3308491e0
BLAKE2b-256 fdadb84dd1c68266afb3fb1ddb501d5bb3fc057caef1ff79f56ddb01fff50883

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page