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.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc0437dba417c057363900cade8ef1e7a384e3a7a96978b270bf7d9dd1c60d4 |
|
MD5 | 27b196e1dac16f831b06a348b838074f |
|
BLAKE2b-256 | 6bcb6b68285a079f18d184203ec21fc39165f9bf000682e7690c9a61dd42c0bb |