Skip to content

LiteLogger/client-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiteLogger for Python

This is the official repo of the LiteLogger client for python. This make it easy to integrate LiteLogger into your existing logging infrastructure.

Installation

pip install LiteLogger

Usage

Below is a simple example. See the 'examples' folder for more comprehensive examples.

import logging
from LiteLogger import LiteLoggerHandler

log = logging.getLogger(__name__)

API_KEY = 'your_api_key'
STREAM_NAME = 'Your Log Stream Name'

# create the LiteLogger Handler
llhandler = LiteLoggerHandler(
	STREAM_NAME,
	API_KEY,
)

# add handler to logger and set level
log.addHandler(llhandler)
log.setLevel('INFO')

log.info('Some Log Message!', extra={
	'metadata': {'some_important_key': 'that keys value'},
	'tags': ['some tag', 'another tag']
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages