Skip to main content

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 login After the login go to get_token

Logging example

import logging
from qwhale_logs_client import init

init(token="<YOUR_TOKEN>", batch_site=1)  # Init logs capture
# The batch site is determine how many logs to send in one request
# For fewer sizes more requests are made (default to 100)

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

logging.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 init

init(token="<YOUR_TOKEN>", batch_site=1)  # Init logs capture
# 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qwhale_logs_client-0.1.14.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

qwhale_logs_client-0.1.14-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page