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.1.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.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rotate-logger-1.1.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.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.2

File hashes

Hashes for rotate-logger-1.1.0.tar.gz
Algorithm Hash digest
SHA256 89ec7a3420fbbddb452fd11d76db40c0b24596135681c0839404cd11b78353eb
MD5 ac78426b593cdc22d8d15ca1e4efe721
BLAKE2b-256 7ef0d056dd1d446f4dbdb6d38e42ab6e800dc96cd700497a5ebb7e3807fd033b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rotate_logger-1.1.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.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.2

File hashes

Hashes for rotate_logger-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb705ca0e74c3fa40b616c42049b0ac4dba6466a578f29717e6c6a94cfa19f7
MD5 b7db0216a7fbb442c01301f7c7ecd861
BLAKE2b-256 e529fef629df7c8ebf79ad4160f8dc00c5920c095073f39dcbe35b3f200de798

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