Skip to content

Logbook #

Find similar titles

1회 업데이트 됨.

Edit
  • 최초 작성자
    Sardor
  • 최근 업데이트

Structured data

Category
Programming

Logbook #

Logbook is a logging system for Python that replaces the standard library’s logging module.

How to install #

$ pip install logbook

Quickstart #

$ python
>>> from logbook import Logger, StreamHandler
>>> import sys
>>> StreamHandler(sys.stdout).push_application()
>>> log = Logger('My Awesome Logger')
>>> log.warn('This is too cool for stdlib')
[2015-10-05 19:02:03.575723] WARNING: My Awesome Logger: This is too cool for stdlib

Core Features #

  • Based on the concept of loggers
  • Has extendable built-in handlers
  • Handlers can be set on an application-wide stack as well as a thread-wide stack
  • Has built-in handlers for streams, arbitrary files, files with time and size based rotation
  • Possibility to inject a handler for testing that records messages for assertions.
  • Built-in support for ZeroMQ, RabbitMQ, Redis
  • Different log levels
0.0.1_20230725_7_v68