Skip to content

Conversation

pepijndevos
Copy link

Some packages log raw integers and possibly other types and it breaks this code, so instead convert the log level to an actual LogLevel first.

@oxinabox oxinabox merged commit 9fdb879 into JuliaLogging:master Oct 4, 2023
@fredrikekre
Copy link
Member

This doesn't even work with the regular loggers:

julia> @logmsg 1000 "hello"
ERROR: MethodError: no method matching handle_message(::ConsoleLogger, ::Int64, ::String, ::Module, ::Symbol, ::Symbol, ::String, ::Int64)

@pepijndevos
Copy link
Author

Is it Sundials that is wrong then? https://github.com/SciML/Sundials.jl/blob/ca8ac7cd0c0c9d096abcbaf904f88b16b9bc6356/src/common_interface/solve.jl#L133

Is this simply not true then?

@logmsg allows level to be set programmatically to any LogLevel or custom log level types.

https://docs.julialang.org/en/v1/stdlib/Logging/#Logging.@logmsg

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