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

enhance logging format: remove logger name, mention location instead #1649

Merged
merged 1 commit into from
Mar 3, 2016

Conversation

boegel
Copy link
Member

@boegel boegel commented Mar 3, 2016

logging format in EasyBuild v2.6.0:

== 2016-03-03 11:08:55,835 runpy.EB_bzip2 INFO This is easyblock EB_bzip2 from module easybuild.easyblocks.bzip2 (/Users/kehoste/work/easybuild-easyblocks/easybuild/easyblocks/b/bzip2.pyc)
...
== 2016-03-03 11:07:26,007 runpy.EB_bzip2 INFO Running method configure_step part of step configure

in current develop, this has changed to this, because of running in optimised mode (cfr. #1357):

== 2016-03-03 11:08:46,118 not available in optimized mode.EB_bzip2 INFO This is easyblock EB_bzip2 from module easybuild.easyblocks.bzip2 (/Users/kehoste/work/easybuild-easyblocks/easybuild/easyblocks/b/bzip2.pyo)
...
== 2016-03-03 11:07:35,524 not available in optimized mode.EB_bzip2 INFO Running method configure_step part of step configure

The proposed change modifies this, by removing the logger name (which is pretty useless anyway), and replacing it with the location from which the log message is sent:

== 2016-03-03 11:08:18,697 easybuild/framework/easyblock.py:257 INFO This is easyblock EB_bzip2 from module easybuild.easyblocks.bzip2 (/Users/kehoste/work/easybuild-easyblocks/easybuild/easyblocks/b/bzip2.pyo)
...
== 2016-03-03 11:07:12,073 easybuild/framework/easyblock.py:2056 INFO Running method configure_step part of step configure

@boegel boegel added this to the v2.7.0 milestone Mar 3, 2016
@boegel
Copy link
Member Author

boegel commented Mar 3, 2016

@wpoely86: thoughts?

@wpoely86
Copy link
Member

wpoely86 commented Mar 3, 2016

👍

@hpcugentbot
Copy link

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2822/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member Author

boegel commented Mar 3, 2016

Jenkins agrees \o/

Thanks for the review @wpoely86!

boegel added a commit that referenced this pull request Mar 3, 2016
enhance logging format: remove logger name, mention location instead
@boegel boegel merged commit a6075d1 into easybuilders:develop Mar 3, 2016
@boegel boegel deleted the fix_log_format branch March 3, 2016 11:02
@gppezzi
Copy link
Contributor

gppezzi commented Mar 3, 2016

I was getting attached to "not available in optimized mode" :(

@boegel
Copy link
Member Author

boegel commented Mar 3, 2016

@gppezzi: shall we add an option so you can keep using it?

@wpoely86
Copy link
Member

wpoely86 commented Mar 4, 2016

It can grow a bit unwieldy:

== 2016-03-04 16:39:31,880 /dev/shm/ward/eb_sandbox_20160304_16-32-22_TrglR/easybuild-framework/easybuild/tools/environment.py:97 INFO Environment variable SCALAPACK_STATIC_LIBS set to libmkl_scalapack_lp64.a,libmkl_blacs_intelmpi_lp64.a,libmkl_intel_lp64.a,libmkl_sequential.a,libmkl_core.a (previously undefined)

@boegel
Copy link
Member Author

boegel commented Mar 4, 2016

eek, indeed...

I'll switch to using %(filename)s instead, which will yield

== 2016-03-04 16:39:31,880 environment.py:97 INFO Environment variable SCALAPACK_STATIC_LIBS set to libmkl_scalapack_lp64.a,libmkl_blacs_intelmpi_lp64.a,libmkl_intel_lp64.a,libmkl_sequential.a,libmkl_core.a (previously undefined)

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.

4 participants