GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jerry-git/logplot: Awesome interactive plots from custom logs

BranchesTags
Open more actions menu

Latest commit

 

History

61 Commits
61 Commits

Folders and files

NameName
Last commit message
Last commit date
doc/examples
doc/examples
 
 
src/logplot
src/logplot
 
 
tests
tests
 
 
.coveragerc
.coveragerc
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
ChangeLog.md
ChangeLog.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
requirements-dev.txt
requirements-dev.txt
 
 
requirements.txt
requirements.txt
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 
tox.ini
tox.ini
 
 

Repository files navigation

LogPlot

Build Status PyPI version PyPI pyversions codecov license PRs

example gif

Installation

$ pip3 install logplot

Usage

Configuration

In order to plot interesting graphs from custom logs, logplot needs to know what log entries are considered interesting. This can be done by defining entries and special_entries sections in the config file. The main purpose of entries is to plot trends, i.e. connected points. This is useful e.g. for plotting state machine states. special_entries is for plotting single, unconnected points, such as errors.

Each entry in entries and special_entries should have the following:

  • identifier: string to be searched from log entries
  • value: y-axis value in the plot

Ideally, one entry in entries should have initial_state: true. This is used for separating plotted series from each other.

You can define specific marker style for each entry in special_entries, refer to matplotlib docs for available options.

In addition to the entries and special-entries sections, user can override default settings (see src/logplot/default_conf.yaml) in general section. For example, it's the place where you can define the command to be used for opening the log in your favorite editor.

See doc/example/user_conf.yaml and corresponding log file (doc/example/log.txt) for full example.

Plotting logs

$ logplot path/to/log -c path/to/conf/file

For example, this:

$ logplot doc/examples/log.txt -c doc/examples/user_conf.yaml

yields this:

example plot

Clicking a data point in the plot opens the log file in the correct line number in the editor defined in the configuration file. If the log_open_cmd is not configured, the log will be opened with a default program defined by the OS. Note that log_open_cmd has to configured to be able to open the log in the correct line number.

logplot will automatically identify different trends in the plotted entries. You can toggle the visibility of these trends by clicking items in the legend.

Here's an example of a bit bigger log which contains 100k entries, 13 different states, and 15 different trends.

$ logplot doc/examples/log_huge.txt -c doc/examples/user_conf_huge.yaml

example plot huge

And the same with three most occuring trends filtered out.

example plot huge filtered

About

Awesome interactive plots from custom logs

Topics

loggingmatplotlibpython3visualization

Resources

Readme
MIT license
Activity

Stars

26 stars

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.