NSLS-II-SRX / profile_collection

NSLS-II SRX beamline IPython startup files for data collection
https://doi.org/10.1016/j.nima.2022.166505
BSD 3-Clause "New" or "Revised" License
3 stars 6 forks source link

IPython "WARNING" log level #27

Closed mrakitin closed 3 years ago

mrakitin commented 3 years ago

An alternative fix/workaround of https://github.com/NSLS-II/nslsii/issues/115. I tested it, and now it does not print the [TerminalIPythonApp] messages to the screen. It would be still nice to have it configurable in nslsii.

mrakitin commented 3 years ago

@andrewmkiss, did it work for you?

mrakitin commented 3 years ago

Thanks for your review, @jklynch! What's interesting, this change only affects the messages printed to the terminal. I didn't see the log entries in the bluesky_ipython.log file are affected.

jklynch commented 3 years ago

I had to think about it for a while. I guess we are currently sending only ipython console input, output, and exceptions to bluesky_ipython.log. The ipython logging messages are something else.

mrakitin commented 3 years ago

Yep, that's what I've noticed too.

andrewmkiss commented 3 years ago

@andrewmkiss, did it work for you?

Sorry, we have been busy with the beamline. I can try to check this on Friday.

jklynch commented 3 years ago

I want to emphasize that I think at beamlines that do not explicitly print startup script names the current behavior is valuable and I would like to keep it. I have not noticed other IPython logging messages but if someone has an example I would be interested to see it.

Also since these messages are coming from the usual python logging framework it should be possible to send them to the bluesky ipython log file, which would make me happy.

mrakitin commented 3 years ago

Also since these messages are coming from the usual python logging framework it should be possible to send them to the bluesky ipython log file, which would make me happy.

The IPython In/Out commands/output are saved to the /var/log/bluesky/bluesky_ipython.log file.

I'll rebase on master to resolve the merge conflicts, and we will re-review.

andrewmkiss commented 3 years ago

Yes, I think I had added the one or two lines of code to "test" before merging and those lines of code were eventually absorbed into master. I can approve the changes. Do we still need to merge?

mrakitin commented 3 years ago

Thanks for the re-review, Andy. Let's merge to have a slightly better formatting :)