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 to console #257

Closed
Tracked by #279
oczoske opened this issue Jul 26, 2023 · 1 comment · Fixed by #339
Closed
Tracked by #279

Logging to console #257

oczoske opened this issue Jul 26, 2023 · 1 comment · Fixed by #339
Labels
API How users interact with the software bug Something isn't working

Comments

@oczoske
Copy link
Collaborator

oczoske commented Jul 26, 2023

I'm mostly running scopesim in an ipython console - very simple and old-fashioned. In order to get logging.info and logging.debug to print to the console I have to use the rather unintuitive sim.stdout_handler.setLevel("DEBUG")
as I found out after a rather lengthy search (repeated due to weak memory). Scopesim seems to offer two more intuitive ways to set the level via sim.utils.set_logger_level(which="console", level="DEBUG") or cmds["!SIM.logging.console_level"] = "DEBUG", but none of these appear to work.
The default level is WARNING. I'd prefer INFO, if only to keep the user entertained while scopesim is doing its thing (more usefully as a progress monitor). However, for notebooks this may already be too much clutter.

@teutoburg
Copy link
Contributor

teutoburg commented Jan 22, 2024

This was further improved in #349 with the addition of the sim.set_console_log_level() convenience function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API How users interact with the software bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants