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

Logging is broken when "error while determining build number" is emitted (Trac #652) #783

Closed
smk78 opened this issue Mar 30, 2019 · 4 comments
Assignees
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour
Milestone

Comments

@smk78
Copy link
Contributor

smk78 commented Mar 30, 2019

Reported by PaulK:

Logging is broken on sasview when "Error while determining build number" is emitted.

According to the following, if a log message is emitted before logging is configured, then the configuration is ignored:

http://stackoverflow.com/questions/29853011/root-logger-ignoring-logger-levelhttp://trac.sasview.org/ticket/29853012

Logging is configured in sasview/sasview.py, which is not run until after sasview/init.py, but sasview/init.py gives a warning when the git command is run.

Rather than calling git at runtime in sasview/init.py, shouldn't we call it in setup.py so that it happens at install time? Note: be sure to capture the build number when uploading to pypi with "python setup.py sdist upload". run.py could poke the build number into sasview.init as part of prepare().

Migrated from http://trac.sasview.org/ticket/652

{
    "status": "closed",
    "changetime": "2016-10-06T15:53:56",
    "_ts": "2016-10-06 15:53:56.981250+00:00",
    "description": "Reported by PaulK:\n\nLogging is broken on sasview when \"Error while determining build number\" is emitted.\n\nAccording to the following, if a log message is emitted before logging is configured, then the configuration is ignored:\n\n    http://stackoverflow.com/questions/29853011/root-logger-ignoring-logger-level#29853012\n\nLogging is configured in sasview/sasview.py, which is not run until after sasview/___init___.py, but sasview/___init___.py gives a warning when the git command is run.\n\nRather than calling git at runtime in sasview/___init___.py, shouldn't we call it in setup.py so that it happens at install time?  Note: be sure to capture the build number when uploading to pypi with \"python setup.py sdist upload\".  run.py could poke the build number into sasview.___init___ as part of prepare().\n",
    "reporter": "smk78",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-09-08T09:59:05",
    "component": "SasView",
    "summary": "Logging is broken when \"error while determining build number\" is emitted",
    "priority": "major",
    "keywords": "",
    "milestone": "SasView 4.1.0",
    "owner": "wojciech",
    "type": "defect"
}
@smk78 smk78 added this to the SasView 4.1.0 milestone Mar 30, 2019
@smk78 smk78 added Defect Bug or undesirable behaviour Incomplete Migration Major Big change in the code or important change in behaviour and removed Incomplete Migration labels Mar 30, 2019
@butlerpd
Copy link
Member

Trac update at 2016/09/13 13:50:51:

  • butler changed owner from "" to "wojciech"
  • butler changed status from "new" to "assigned"

@butlerpd
Copy link
Member

Trac update at 2016/09/13 14:07:02: butler changed milestone from "SasView 4.0.0" to "SasView 4.1.0"

@wpotrzebowski
Copy link
Contributor

Trac update at 2016/10/06 15:53:39: wojciech commented:

The logging is working now as the git revision number has been fixed in the commit: [https://github.com/SasView/sasview/commit/a3f1c11e89e334f2707e2834709485c8107d1e72 a3f1c11]

@wpotrzebowski
Copy link
Contributor

Trac update at 2016/10/06 15:53:56:

  • wojciech changed resolution from "" to "fixed"
  • wojciech changed status from "assigned" to "closed"

@smk78 smk78 closed this as completed Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour
Projects
None yet
Development

No branches or pull requests

3 participants