Alogator
Alogator is an aggregated logging actor system.
Installation
To get the latest stable release from PyPi
pip install alogator
To get the latest commit from GitHub
pip install -e git+git://github.com/arteria/alogator.git#egg=alogator
Add alogator to your INSTALLED_APPS and define a logger
INSTALLED_APPS = (
...,
'alogator',
)
LOGFILE_PATH = os.path.join(os.path.join(BASE_DIR, 'logs/'), "alogator.log")
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'formatters': {
'standard': {
'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt': "%d/%b/%Y %H:%M:%S"
},
},
'handlers': {
'logfile': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': LOGFILE_PATH,
'maxBytes': 1000000,
'backupCount': 0,
'formatter': 'standard',
}
},
'loggers': {
'alogator': {
'handlers': ['logfile'],
'level': 'DEBUG',
},
}
}
Don’t forget to create the tables for your database
./manage.py syncdb alogator
# python manage.py migrate
Usage
Setup your logfiles, search patterns and actors in the admin backend.
To run one (scan all logfiles for patterns) just call the scanlogfiles management command.
python manage.py scanlogfiles
You can use alogator_cli to check the log files in a project. Simple add paths to settings files as arguments. Be aware that you have to run the project, so you need to first activate your virtualenv if you have one.
# if you have a virtualenv
. /path/to/env/bin/activate
alogator_cli /path/to/project/settings.py
To run this continously you could setup a cronjob. For example, to run this every other minute use
crontab -e
Than add
*/2 * * * * /path/to/your/manage.py scanlogfiles
You may have to activate your virtualenv depending on your setup.
TODO
Customizable temporary working dir instead of /tmp
Customizable subject, eg. [Alogator] (to filter inbox)
Add “To mute this actor, visit…” in message/email.
Histroy
Please refer to CHANGELOG.txt
Contribute
If you want to contribute to this project, simply send us a pull request. Thanks. :)
Metadata
Release files for alogator 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| alogator-0.2.0.tar.gz | 10.7 kB | Without provenance | Details for alogator-0.2.0.tar.gz |
Release files / alogator-0.2.0.tar.gz
| Download URL | alogator-0.2.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
637feed01c796921a1a62dd67bd47ab046f4ddd55ac6206ccbbe58ac85365f00
|
|
BLAKE2b-256 checksum How to use checksums |
ea89d4150b75dc6ed29933906508985dfd702a8ee91e8f00d62bdd0758c11b2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for alogator 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.