Logging
As voraus-robot-arm-py is a library not an application, we have to follow some rules when logging:
Do not log to the root logger! Logging to the root logger will make it difficult or impossible for the application developer to configure the logging verbosity or handlers of your library as they wish. Instead follow the package structure when using a logger:
_logger = logging.getLogger(__name__)Do not add any handlers to the logger! This is because the configuration of handlers is the prerogative of the application developer who uses your library. The application developer knows their target audience and what handlers are most appropriate for their application: if you add handlers ‘under the hood’, you might well interfere with their ability to carry out unit tests and deliver logs which suit their requirements.
Only log from library code e.g.
src. Do not use a logger intestsas this creates a mix between logs, useprint’s instead.
More information can be found here.