Skip to content

Fix up logging and (remove) print statements #73

@kevin-bates

Description

@kevin-bates

Currently, the logger used in this package is a property on the various class instances. This module introduces the following issues:

  1. Helper methods that are not associated with the instances don't have direct access to the logger instance and often resort to print() statements or nothing at all.
  2. The current logger is named after self.__module__ which results in having separate logger instances for each class - depending on where the class is defined. As a result, if an application wishes to configure logging for yarn-api-client, they would need to add configuration entries for each class.

I'd like to propose we adopt a well-known logger name (e.g., "yarn-api-client") defined as a global (probably in base.py) that is instantiated when the module is loaded. This way the various methods in hadoop_conf.py, etc., can utilize logging as well and don't need to resort to print statements in times when logging info, warning, error (and debug) information is more warranted.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions