Skip to content

Conversation

jClugstor
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

First, this makes it so that if the level is an ErrorLevel, emit_message will also throw an exception, after putting the Error message in to the log.

To be clear this means that

@SciMLMessage(message, verbose, :setting)

will put an error message in to the log, then throw an ErrorException, if verbose.setting is an ErrorLevel.

@ChrisRackauckas is that the desired behavior? I could also make it so that ErrorLevel has a Bool field, so users can choose to just send the message to the log and not throw an error.

Second, Logging.Debug is a thing, so it should be exposed and able to be used.

Also cleaned up the signature for emit_message, got rid of now unneeded arguments.

@jClugstor jClugstor mentioned this pull request Oct 10, 2025
5 tasks
@ChrisRackauckas
Copy link
Member

@ChrisRackauckas is that the desired behavior? I could also make it so that ErrorLevel has a Bool field, so users can choose to just send the message to the log and not throw an error.

Yes, the idea is "I want to know exactly when this thing is happening" can be done by turning that print into an error and then you'll be right there in the stack trace.

@ChrisRackauckas
Copy link
Member

Second, Logging.Debug is a thing, so it should be exposed and able to be used.

I don't understand why "debug" would be lower than the others? What is that doing?

@ChrisRackauckas ChrisRackauckas merged commit e6f1d7f into SciML:main Oct 13, 2025
3 of 4 checks passed
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.

2 participants