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

Properly namespace the logger for sub classes of AbstractNode #897

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Nov 7, 2017

The metaclass of the AbstractNode class does some magic to
properly set the logger that is configured for AiiDA for all the
sub classes, however it did not properly prepend it with the aiida
namespace. This means that for sub classes that live outside of
the aiida module, their module path will not match the aiida logger
and the configured handlers and adapters will not be applied.
As a result, for example, in JobCalculations that live in separate
plugins, the DbLogHandler will not work as expected.

The __metaclass__ of the AbstractNode class does some magic to
properly set the logger that is configured for AiiDA for all the
sub classes, however it did not properly prepend it with the aiida
namespace. This means that for sub classes that live outside of
the aiida module, their module path will not match the aiida logger
and the configured handlers and adapters will not be applied.
As a result, for example, in JobCalculations that live in separate
plugins, the DbLogHandler will not work as expected.
@giovannipizzi giovannipizzi merged commit 2dad741 into aiidateam:release_v0.10.0rc3 Nov 7, 2017
@sphuber sphuber deleted the fix_896_abstract_node_sub_class_logger branch November 8, 2017 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants