Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪵 Log #2

Merged
merged 3 commits into from
Mar 14, 2023
Merged

🪵 Log #2

merged 3 commits into from
Mar 14, 2023

Conversation

mrharpo
Copy link
Contributor

@mrharpo mrharpo commented Mar 14, 2023

Log

Adds logging with loguru and rich.

Usage

from .log import log
log.info('normal information')
log.debug(f'detailed info about {object}')

Results

[03/14/23 10:50:19] INFO     2023-03-14 10:50:19.407 | INFO     | fastclam.app:run_pipeline:43 - Starting pipeline files=['video://m/cpb-aacip-29-11xd26xv.h264.mp4'] apps=['http://localhost:5000']                                             app.py:43
                    INFO     2023-03-14 10:50:19.412 | INFO     | fastclam.app:generate_source:32 - sourcing media ['video://m/cpb-aacip-29-11xd26xv.h264.mp4']                                                                                  app.py:32
                    DEBUG    2023-03-14 10:50:19.426 | DEBUG    | fastclam.app:generate_source:35 - sourced: {'metadata': {'mmif': 'http://mmif.clams.ai/0.4.0'}, 'documents': [{'@type': 'http://mmif.clams.ai/0.4.0/vocabulary/VideoDocument', app.py:35
                             'properties': {'mime': 'video', 'id': 'd1', 'location': 'file:////m/cpb-aacip-29-11xd26xv.h264.mp4'}}], 'views': []}                                                                                                         
                    DEBUG    2023-03-14 10:50:19.428 | DEBUG    | fastclam.app:run_pipeline:48 - Running video://m/cpb-aacip-29-11xd26xv.h264.mp4 through http://localhost:5000                                                                  app.py:48
[03/14/23 10:50:23] INFO     2023-03-14 10:50:23.777 | INFO     | fastclam.app:run_pipeline:59 - Ran 1 files through 1 apps                                                                                                                      app.py:59
INFO:     127.0.0.1:52498 - "POST /pipeline?all=false HTTP/1.1" 200 OK

More colors in terminal:
Screen Shot 2023-03-14 at 11 07 02

Other

  • Updates .vscode/launch.json to default to debug mode
  • Updated dependency versions

@mrharpo mrharpo added documentation 📜 Improvements or additions to documentation maintenance 🔧 Updates and upgrades labels Mar 14, 2023
@mrharpo mrharpo added this to the v0.1.0 Demo 🏗️ milestone Mar 14, 2023
@mrharpo mrharpo self-assigned this Mar 14, 2023
@mrharpo mrharpo merged commit 7973a05 into main Mar 14, 2023
@mrharpo mrharpo deleted the log branch March 14, 2023 21:01
mrharpo added a commit that referenced this pull request Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📜 Improvements or additions to documentation maintenance 🔧 Updates and upgrades
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant