Skip to main content

A logging tool is used to record all kinds of logs during program running.

Project description

just-logger

A logging tool is used to record all kinds of logs during program running.

demo

# Initialize.
logger = Logger('demo', level=LogLevel.DEBUG) # global log-level
logger.add_stream_handler(LogLevel.DEBUG) # log-level for console base on global level
logger.add_file_handler('demo.log', LogLevel.INFO) # log-level for log file base on global level

logger.log('Hello world!', LogLevel.INFO)
logger.log('Caution please!', LogLevel.WARNING)
logger.log('Error was found!', LogLevel.ERROR)
logger.log('Fatal error!', LogLevel.CRITICAL)
logger.log('Debugger!', LogLevel.DEBUG) # Cannot be recorded in log file, but can be showed on console.
obj = {
    'code': 0,
    'message': 'success',
    'data': {
        'content': 'only for testing.'
    }
}
logger.log(json.dumps(obj, ensure_ascii=False, indent=4), LogLevel.INFO)

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

just_logger-0.2.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

just_logger-0.2.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file just_logger-0.2.1.tar.gz.

File metadata

  • Download URL: just_logger-0.2.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for just_logger-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7b55f4fd38fda2077c667a9b84f1fc0601f3d9f98aef2b748c41f49c8e4db34f
MD5 1a7cf9020d9bd370b69a079e09e488a9
BLAKE2b-256 81572dec5a439677e517116d879130d973da328585d6236b964f31a9bfc68b8f

See more details on using hashes here.

File details

Details for the file just_logger-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: just_logger-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for just_logger-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26d12d7e1c8a022bb5e948fc43e799e3b932db6b57d7623edbff1f5a0ee42535
MD5 8fd7b201bf1c29214a19637a3a9050a5
BLAKE2b-256 107a1ac9eea20fe79dcb77070ae1c4562b3dc0c78b6a90784648266a7a7b65e2

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