Skip to content

Nginx error log parser. This is a forked from madsmtm/nginx-error-log and added enhancements

License

Notifications You must be signed in to change notification settings

MyMusicTaste/nparser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nparser

Nginx error log parser.

This project provides a clean parsing of nginx error logs, produced by the error_log directive (not access logs). The implementation is based on this stackoverflow answer.

You can use this to parse Kong's logs.

Installation

git clone git@github.com:MyMusicTaste/nparser.git
cd nparser
pip install -e .

USAGE

from nparser import parse_line

entry = parse_line('2019/10/01 07:16:38 [warn] 70#0: *3 [lua] balancer.lua:718: redistributeIndices(): [ringbalancer 4] redistributed indices, size=10000, dropped=10000, assigned=0, left unassigned=10000, context: ngx.timer')
print(entry.message)

License

MIT, see LICENSE.txt.

About

Nginx error log parser. This is a forked from madsmtm/nginx-error-log and added enhancements

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%