-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Tinylog via SLF4J cannot handle text within curly brackets #132
Comments
tinylog expects a DecimalFormat or ChoiceFormat compatible pattern in the curly brackets. But 'bar' isn't a compatible pattern either of them. For example, For solving your issue, a way for escaping curly brackets is required. I'm thinking about something like |
By the way, |
Thanks for checking this out. The project that causes this problem isn't mine so I cannot escape all curly brackets. If I can find some time I'll look into this. |
What is the class name of the |
It's a third-party logger that implements
Furthermore |
@sanderdg Thank you for the clarification. I think we need two different solutions:
|
I have implemented it on the v2.1 branch. All third-party logging API like SLF4J should keep @sanderdg Could verify if it works for you, too? slf4j-tinylog-2.1-SNAPSHOT.zip Additionally, it is possible to escape phrases by ticks now, if using tinylog's native logging API. For example: |
I've verified it and it works. Thanks for fixing this! 👍 |
Thank you for verifying :-) I will release it as RC2 soon. |
This closed issue has been locked automatically. However, please feel free to file a new issue. |
I'm currently trying to use a project that adds curly brackets to log statements like this;
logger.info("{foo} {}", "bar")
. Tinylog tries to process{foo}
as a placeholder that needs to be replaced by something but that isn't the case obviously. Only{}
should be replaced bybar
.Expected result:
{foo} bar
Actual output:
LOGGER WARN: Illegal argument 'bar' for pattern 'foo'
(which is created byMessageFormatter
informat(final String pattern, final Object argument)
on line 116)The text was updated successfully, but these errors were encountered: