Skip to content

A scalable logging module for Grafana Loki

License

Notifications You must be signed in to change notification settings

Surajgupta9160/pyloki

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyLoki

A scalable instance associated module for logging in Grafana Loki

Get Started

pip install pyloki
from pyloki import PyLoki

auth_loki = PyLoki(source='Authentication Service', job='auth.service')
auth_loki.warn('This module is warning me of something')

Configurable Instance Options

  • host: Host of your Loki instance default: localhost
  • port: Port if needed default: 3100
  • If secured:
    • username
    • password
  • protocol: Protocol to follow default: http
  • src_host: Host from which the logs are being streamed

Functions

set_tz(zone='Asia/Kolkata')

Sets your timezone for the log stream

set_header(key, value)

Sets additional http headers to logs

License

MIT

About

A scalable logging module for Grafana Loki

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%