PermafrostDiscoveryGateway / viz-points

Python package for post-processing point-cloud data for 3D visualization
Apache License 2.0
0 stars 1 forks source link

Standardize use of `logging` #23

Closed iannesbitt closed 1 year ago

iannesbitt commented 1 year ago

If logging is set up in the __init__ file, will logging start as soon as the package is imported, even if no other part of the package is used? Are there advantages to doing it this way?

Using the L global variable for your logger might make viz-points more difficult to integrate it with the other workflow packages, and might be a problem when we have multiple processes running on different nodes.

In the other viz-* packages, we create a new logger in each module with logging.getLogger(__name__). Logging is configured in the main entry point for the workflow (in viz-workflow). This way, we have one centralized place where logging is set up, and we avoid issues with logging configs from different modules stepping on each other.

Originally posted by @robyngit in https://github.com/PermafrostDiscoveryGateway/viz-points/pull/12#pullrequestreview-1429135885

iannesbitt commented 1 year ago

Tested and working