Skip to content
This repository was archived by the owner on Sep 7, 2023. It is now read-only.

Commit b89ea37

Browse files
committed
Refactor/Reorganize for log analyzer
1 parent 05693d7 commit b89ea37

22 files changed

+2487
-104
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,6 @@ dmypy.json
132132
.idea/**/contentModel.xml
133133

134134
/mailconfig
135-
pip-wheel-metadata
135+
pip-wheel-metadata
136+
137+
/node_modules/

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,21 @@ endif
143143
run:
144144
$(PYTHON) -m jupyter lab
145145

146+
.PHONY: log-server
147+
## Run logger
148+
log-server: run_json_emitter run_json_server
149+
150+
.PHONY: run_json_server
151+
## Run json server for logs api
152+
run_json_server:
153+
sleep 5
154+
npm run json-server
155+
156+
.PHONY: run_json_emitter
157+
## Run json emitter script
158+
run_json_emitter:
159+
$(PYTHON) scripts/log_to_json.py
160+
146161
.PHONY: docs
147162
## Make docs
148163
docs:

docs/getting-started.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,10 @@ Installation
3838
3939
$ make docs
4040
41-
7. Start coding...
41+
7. To run json log server,
42+
43+
.. code-block:: console
44+
45+
$ make -j2 log-server
46+
47+
8. Start coding...

env.example.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ logger:
2121
format: "%(threadName)s %(asctime)s - %(name)s - %(levelname)s - %(message)s"
2222
simple:
2323
format: "%(name)-12s %(levelname)-8s %(message)s"
24+
json:
25+
format: "%(message)s"
26+
class: "pythonjsonlogger.jsonlogger.JsonFormatter"
2427
handlers:
2528
console:
2629
class: logging.StreamHandler

0 commit comments

Comments
 (0)