Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.
/ logwtf Public archive

Recreate message sequence charts from single logfile

Notifications You must be signed in to change notification settings

phubbard/logwtf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What this is

The Problem:
We have a problem on our project (http://ooici.net/): We're writing multiprocessing messaging-based
code with a single logfile/stream, using Python logging. The problem is trying to
decipher what's going wrong from the intermingled log messages.

The Idea:
What you want to see is a message sequence chart, where there's a column in a browser
for each process/thread, and the vertical axis is time.

The Technology:
1) html5 canvas, used as simple (x,y, text)
2) jquery (for event hooks, viewport size)
3) python + twisted to create a RESTful server
4) javascript to pull and display

The components:
1) ionlog.py to parse and restructure the logfile into a set of data with 3 methods
 a) get_config returns a dictionary of num_cols and column_names
 b) get_names returns just the column names
 c) get_single_log(name) returns just an array of messages for a given name
 Result is an array of dictionaries with
 i) delta_t time since first log message (relative time, in seconds)
 ii) timestamp, ISO 8601 (absolute time)
 iii) log level for colorization and filtering. DEBUG, INFO, WARNING, ERROR, CRITICAL
 iv) Msg has the string, filtered a bit for json-encodabilty
2) ws.py to present via REST and also handle JSON encoding
3) one.js for javascript code.
 a) Pull the configuration to draw the canvas
 b) add column headers
 c) for each column, draw the messages on the canvas
4) one.html as the page to load that invokes the jscript

Lots of work left!

About

Recreate message sequence charts from single logfile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published