NDJSON formatted logger integration with Sanic
Project description
entry-logger-sanic
A logger for Sanic based EntryDSM service
Install
pip install entry-logger-sanic
Feature
- Request logging
- System logging
- File saving in NDJSON format
Usage
import os
from sanic import Sanic
from entry_logger_sanic import set_logger
log_path = os.path.dirname(__file__).replace("/service", "").replace("/currentdir", "") # example
app = Sanic("SERVICE NAME") # please specify service name!
set_logger(app, log_path)
...
The log file will be saved under {designated path}/log
as {given service name}.log
Versioning
{Major}.{Minor}.{Patch}
ex: 0.2.3
- Major: without subcompatibility
- Minor: with partial subcompatibility
- Patch: with full subcompatibility
Maintainer
- Seonghyeon Kim - NovemberOscar
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 entry-logger-sanic-0.1.7.tar.gz
.
File metadata
- Download URL: entry-logger-sanic-0.1.7.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54f8776e2f4b480ed57fb4cbe492829b4d5e29cc3cf595a719112f801a5fb13f |
|
MD5 | 3bbd45cdd19f4ac654c17544505eeee5 |
|
BLAKE2b-256 | 7d0abbb3719601b9c5e2c363a0a7a059e449bdfec9d73be9443d959364fab00a |