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.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd0e9f1415ba103be0dfed74a07a2f503ff9b884bce2b38ad92ce20c98a444b6 |
|
MD5 | 5d34e2920589d30babd327c106ae07cd |
|
BLAKE2b-256 | c03eaff5574db3812a2b7821a48b1bbe32c75fa9755dc85dfa96f29a85631788 |