numaproj / numalogic-prometheus

AIOps for metrics in Prometheus
Apache License 2.0
31 stars 10 forks source link

feat: add loguru for logging #143

Closed s0nicboOm closed 1 year ago

s0nicboOm commented 1 year ago

Support logging with Loguru library. Link: https://github.com/Delgan/loguru

codecov-commenter commented 1 year ago

Codecov Report

Merging #143 (d425e7f) into main (a40fea5) will decrease coverage by 0.87%. The diff coverage is 72.48%.

@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
- Coverage   82.64%   81.78%   -0.87%     
==========================================
  Files          20       20              
  Lines        1141     1131      -10     
  Branches      116      117       +1     
==========================================
- Hits          943      925      -18     
- Misses        176      184       +8     
  Partials       22       22              
Impacted Files Coverage Δ
numaprom/clients/redis.py 0.00% <0.00%> (ø)
numaprom/watcher.py 66.66% <40.00%> (-0.29%) :arrow_down:
numaprom/udsink/train.py 52.38% <46.15%> (-0.90%) :arrow_down:
numaprom/__init__.py 60.60% <57.14%> (-23.40%) :arrow_down:
numaprom/clients/prometheus.py 65.71% <60.00%> (-0.49%) :arrow_down:
numaprom/udsink/train_rollout.py 85.12% <66.66%> (-0.13%) :arrow_down:
numaprom/tools.py 92.62% <75.00%> (-0.12%) :arrow_down:
numaprom/udf/preprocess.py 88.88% <85.71%> (-0.48%) :arrow_down:
numaprom/udf/threshold.py 91.52% <87.50%> (-0.28%) :arrow_down:
numaprom/udf/window.py 94.82% <87.50%> (-0.09%) :arrow_down:
... and 6 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

s0nicboOm commented 1 year ago

Where are we setting the log format? formatter: formatter = "<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <level>{level: <8}</level> |{message}"` image

s0nicboOm commented 1 year ago

Where are we setting the log format? formatter: formatter = "<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <level>{level: <8}</level> |{message}"` image

Different logs also have different colors: image