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

Add support for java.util.logging #6

Open
Riduidel opened this issue Mar 23, 2023 · 2 comments
Open

Add support for java.util.logging #6

Riduidel opened this issue Mar 23, 2023 · 2 comments

Comments

@Riduidel
Copy link

I tend to use java.util.logging for logging. Could you add its support ?

@achimgrimm
Copy link
Member

I never used java.util.logging. I guess, that makes me to a bad person to implement it. :)
But I like the idea and would be happy to check and changes.

akutschera added a commit to akutschera/assertj-logging that referenced this issue Apr 1, 2023
@akutschera
Copy link

The PR above will use the existing interface of ExpectedLoggingAssert, i.e. it uses hasErrorMessage when checking for log messages with level "SEVERE", because j.u.l. has no error level.
To stay withing the j.u.l. domain we could add hasSevereMessage with the same functionality as hasErrorMessage.
Using hasErrorMessage to check for a severe message could be confusing to the test reader.
Since I don't use java.util.logging either, @Riduidel , could you help here and say what you would prefer?
Bonus question: Would you remove hasErrorMessage in the assertj-logging-jul artefact?
Of course this goes for all the other methods that handle error/severe levels, too.

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

No branches or pull requests

3 participants