-
Notifications
You must be signed in to change notification settings - Fork 11
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
Optional params not working in ConsoleLoggerFactory #16
Comments
That's a misunderstanding - due to missing documentation: slogging implements the SLF4J API, i.e. additional arguments to the logging methods are not simply appended to the message, but are used to replace val obj = literal(x = 5)
logger.info("obj: {}",obj) However, this was not properly implemented in previous versions of slogging, so you need to use 0.5.0 for this to work. |
To "piggyback" on the question above. I think there's more than just the API. Any suggestions on how to walk around the issue? In theory you might pass many additional arguments to |
@pjazdzewski1990 I agree that the current handling of JS objects is unsatisfactory. However, the main goal of this library is to provide consistent logging for JVM, JS, and Scala Native. Let's consider your example: we could change console.log("Message was: ",foo); when calling logger.info("Message was:", foo) That would work fine when we use logger.info("foo was: {}, and bar was: {}",foo,bar) but that would print out something like
with the changed semantics for |
What I was thinking was this: make it consistent on "write" and convenient on "read". |
@pjazdzewski1990 sure, go ahead! I'm happy about any help to improve this lib. |
The text was updated successfully, but these errors were encountered: