This recipe logs an information into storage. It's a part of https://github.com/potar/dagger
Project description
Introduction
This recipe creates the program daemon (logger) which is listening to the socket. It generates logs in an appropriate format (JSON, CSV, PICKLE).
Example usage
The simplest way to use this recipe is to add it to your buildout.cfg like this:
[buildout] parts = logger [logger] recipe = collective.recipe.logger
Go to collective/recipe/logger/README.rst to see more details.
Development
Code repository: https://github.com/potar/collective.recipe.logger
The code comes with a buildout.cfg. Please bootstrap the buildout and run the created bin/test to see if the tests still pass. Please add tests if you add code.
Questions and comments send to the Plone product-developers list or to potar: poburynnyitaras@gmail.com
Supported options
The recipe supports the following options (none of which are needed by default):
- ip
It’s a host ip. Default value: localhost
- port
It’s an application (daemon) port. Default value: 8090 (DEFAULT_TCP_LOGGING_PORT)
- maxlen
It’s a circular buffer size. Default value: 100. It means that you can store 100 records into storage.
- mode
It’s file mode bits which is intended to the file storage. Default value: 0644
- format
It’s a storage type. Options: ‘csv’, ‘json’, ‘pickle’. Default value: ‘json’
- eggs
It sets up additional products. They help serialize objects. For example, your object will not be a standard python collection so you need an appropriate class for this object. If you use Plone I recommend you set up eggs = ${instance:eggs}
Notes
A storage filename is generated by id_generator (src/collective/recipe/logger/utils.py).
Contributors
Taras Poburynnyi (potar), Author
Changelog
0.1.0b1
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file collective.recipe.logger-0.1.0b1.zip
.
File metadata
- Download URL: collective.recipe.logger-0.1.0b1.zip
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bf468fb84fa347898258d9d094c1d9c655a422f0468290c7e715f130c51565c |
|
MD5 | b92ca9d29c6ef8c0d721ed3fc1b1b455 |
|
BLAKE2b-256 | 49c2092efce688fc472a4c98c6de40ec0989252d21229e9a70dc33f4e6495339 |