Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jl-wynen
Copy link
Member

With Mantid 6.4, we can now capture Mantid's log messages and display them along our logs. This should fix the problem of messages not showing sometimes.

If an older version of Mantid is installed, the configuration will work as before and not touch Mantid.

@nvaytet
Copy link
Member

nvaytet commented Jul 14, 2022

Can you add a logging configuration step to the LOKI (sans2d) workflows so that it also catches the Mantid output there?
Screenshot at 2022-07-14 12-18-05

Also, I remember we have a similar problem in scippneutron, e.g. the instrument view page. Do we need a similar fix there?

@jl-wynen
Copy link
Member Author

Can you add a logging configuration step to the LOKI (sans2d) workflows so that it also catches the Mantid output there?

Done.

I postponed doing anything in scippneutron until we are happy with the setup in ess. We didn't like having to call a config function manually. And I don't think anything has changed.

@nvaytet
Copy link
Member

nvaytet commented Jul 15, 2022

Do i remember correctly that getting rid of the config step would probably be solved by a workflow builder/manager or something like it?
So we would need a different solution for scippneutron anyway?

},
"outputs": [],
"source": [
"_ = configure_workflow('sans2d_I_of_Q', filename='sans2d.log')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"_ = configure_workflow('sans2d_I_of_Q', filename='sans2d.log')"
"logger = configure_workflow('sans2d_I_of_Q', filename='sans2d.log')"

Would be a bit less cryptic? (This is how it's done in the Amor notebook)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. It is unused, though.

@jl-wynen
Copy link
Member Author

Do i remember correctly that getting rid of the config step would probably be solved by a workflow builder/manager or something like it?
So we would need a different solution for scippneutron anyway?

If we end up implementing a manager, yes.
Since scippneutron does not have any 'application' components, I think the best we can do is provide a similar configure function and call that at the top of a notebook. Unless, that is, we implement a workflow manager in scippneutron, there is nothing inherently ess-specific about it.

@jl-wynen jl-wynen merged commit f722262 into main Jul 19, 2022
@jl-wynen jl-wynen deleted the mantid-logging branch July 19, 2022 13:30
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.

3 participants