Python client for QwhaleLogs API
Project description
QWhaleLogsClient
QWhaleLogs client lib for saving logs in remote service
Install
$> pip install qwhale-logs-client
Get token
Go to https://logs.qwhale.ml/provider/login After the login go to https://logs.qwhale.ml/api/token
Logging example
import logging
from qwhale_logs_client import QWhaleLogsHandler
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger("SimpleOne")
logger.addHandler(QWhaleLogsHandler(token="<YOUR_TOKEN>", batch_site=1)) # Add our logs handler
# The batch site is determine how many logs to send in one request
# For fewer sizes more requests are made (default to 100)
logger.info("Some log") # Normal use
# Now your logs are sent to the QWhaleLogsService
Loguru example (Recommended)
from loguru import logger
from qwhale_logs_client import QWhaleLogsHandler
logger.add(QWhaleLogsHandler(token="<You'r-Token>", batch_site=1))
# The batch site is determine how many logs to send in one request
# For fewer sizes more requests are made (default to 100)
logger.info("Some log") # normal use
# Now your logs are sent to the QWhaleLogsService
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
Built Distribution
Close
Hashes for qwhale_logs_client-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c79f0d1c04743e348705b26fb9da49b1f261c16e3708814267483b7fc2977db |
|
MD5 | 599c0e3fe7fb3f8a83a6b9cb739ceb23 |
|
BLAKE2b-256 | 11c4a144c304c0e684c8300b805a238be51e84f63f4fb8889939c3cff80b369c |