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

Enhanced python plugin logging #22

Open
richcar58 opened this issue Jun 6, 2023 · 1 comment
Open

Enhanced python plugin logging #22

richcar58 opened this issue Jun 6, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@richcar58
Copy link
Collaborator

richcar58 commented Jun 6, 2023

Modifications to the image_gen_plugin and image_score_plugin should include using the logging API to write log messages rather than writing to stdout. In addition, the image_gen_plugin should follow these practices:

  1. Do not log the list of all files in the input directory when processing each file in that directory. Instead, print the list of all files one time if TRACE level logging is turned on.
  2. When processing each file, log an INFO record that reads something like "Processing file n of x", where n is the current processed file count and x is the total number of files in the directory.
  3. When processing each file, log an INFO record that indicates the original file name and the uuid assigned to it. Something like "myimage.jpg -> uuu-xxx" is fine.
  4. Use DEBUG level logging for recording loop information and other information needed to debug the plugin. For example, log records like "Bottom of send_images loop; index: 2; index_value: 2; initial_index: 0" only need to be written when debugging loop execution.

In general, use INFO level logging for capturing useful information under normal processing where it's important to minimize the noise and size of the log; use DEBUG for troubleshooting information; and use TRACE for absolutely everything we'll ever want to record. Of course, ERROR and WARN should be used to records problems or possible problems.

@joestubbs
Copy link
Contributor

Hi @serenashah -- can you give an update on where this issue is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

3 participants