Skip to content

Enhanced python plugin logging #22

@richcar58

Description

@richcar58

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.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status

To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions