marquee documentation¶
Contents:
marquee¶
marquee is a very simply Python logging formatter and handler to send log events as CloudWatch Events.
Features¶
- simple log formatter
- handler to send events to CloudWatch Events
Documentation¶
Documentation can be found at http://marquee.readthedocs.io/en/latest/.
Installation¶
Stable release¶
To install marquee, run this command in your terminal:
$ pip install marquee
This is the preferred method to install, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
From sources¶
The sources for marquee can be downloaded from the Github repo.
Clone the repository:
$ git clone git@github.com:theherk/marquee.git
Once you have a copy of the source, you can install it with:
$ python setup.py install
Usage¶
Handler¶
To use the handler, simply add it to you log:
import logging
from marquee.formatter import MarqueeFormatter
from marquee.handler import CloudWatchEventsHandler
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
handler = CloudWatchEventsHandler()
log.addHandler(handler)
Formatter¶
To use the formatter, which is optional, add it to your handler. If you don’t use this formatter, __name__ will be used for the source in the handler. If you do, you can pass source too the handler along with any other formatter arguments. Then, this will be included in the CloudWatch Event.
To add the formatter to the handler:
fmt = MarqueeFormatter('theherk.testapp')
handler.setFormatter(fmt)
Contributing¶
Contribution are welcome. You can contribute in the following ways.
- report bugs
- fix bugs
- implement features
- write documentation
- submit feedback
Get Started¶
Pull / Merge Request Guidelines¶
marquee¶
marquee package¶
Submodules¶
marquee.formatter module¶
marquee logging formatter.
marquee.handler module¶
marquee logging handler.