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

log "config-side" variable name when running module #27

Open
sq6jnx opened this issue Nov 25, 2014 · 0 comments
Open

log "config-side" variable name when running module #27

sq6jnx opened this issue Nov 25, 2014 · 0 comments

Comments

@sq6jnx
Copy link
Owner

sq6jnx commented Nov 25, 2014

Currently when running module

2014-11-25 19:04:41,459 root INFO: starting <activity_map.ActivityMap object at 0xb4cdb1ac>...

is logged, which is OK, but doesn't answer the question where to look at if something fails where there will be more than one module (instance) of the same class.

We need some way to find config-side variable in run time. Possible solutions:

(Pdb) [v for v in dir(config) if id(eval('config.%s' % v)) == id(module)]
['activitymap']

saving id(self) on __init__() (not tested, especially in inheritance) and then comparing module.get_id() with element of modules list.

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

No branches or pull requests

1 participant