A tool to synchronize and compare logs generated in different timezones, with clock skews, and different timestamp formats.
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.
git clone git@github.com:TheGarvitGupta/LogSync.git
- Download the latest version of Python 3 (https://www.python.org/downloads/)
- Installation and execution. See Setup with virual environment (Recommended).
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/
cd LogSync
mkdir env
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
FLASK_APP=engine.py flask run
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)
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
Loaded one log with parsed timestamps, and filtering (regex)