Skip to content

TheGarvitGupta/LogSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogSync

A tool to synchronize and compare logs generated in different timezones, with clock skews, and different timestamp formats.

Information

This app runs on Python 3. It will not run with Python 2.7 versions due to the differences in the datetime objects across Python versions.

Setup

git clone git@github.com:TheGarvitGupta/LogSync.git
cd LogSync
pip install -r requirements.txt
FLASK_APP=engine.py flask run

If you want to run it on a port other than the default (5000) port, use: FLASK_APP=engine.py FLASK_RUN_PORT=5001 flask run

The tool should be accessible at localhost:5000/

Setup with a virtual environment (Python3)

cd LogSync
mkdir env
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
FLASK_APP=engine.py flask run

Custom Time Format

The following files contain the date formats for parsing and rendering each log file. You might need to modify these based on your log files.

Config/date_formats.txt: These are the formats that are (by default) used to attempt to parse the time, along with the lengths that are tried for each format.

[	
	('%m/%d/%y %H:%M:%S:%f %z', [31, 28]),
	('%b %d %H:%M:%S:%f %z', [28, 25]),
	('%m/%d/%y %H:%M:%S:%f', [24, 21]),
]

Config/date_print_formats.txt: This is the default print format

"%Y/%m/%d %H:%M:%S:%f"

Check the datetime directives for understanding what those symbols mean: (https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior)

Python dependencies

click==6.7 Flask==1.0.2 itsdangerous==0.24 Jinja2==2.10 MarkupSafe==1.0 python-dateutil==2.7.3 pytz==2018.5 six==1.11.0 Werkzeug==0.14.1

Screenshots

LogSync Loaded one log with parsed timestamps, and filtering (regex)

LogSync Comparing two logs side by side

LogSync Comparing two logs by accounting for the offset in the time

About

A tool to synchronize and compare logs generated in different timezones, with clock skews, and different timestamp formats.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published