Skip to content

Log messages dispatched using the swift-log backend are missing normal swift-log formatting. #1389

Closed Answered by ffried
thisisaaronland asked this question in Q&A
Discussion options

You must be logged in to vote

@thisisaaronland First of all a big thanks to you for a very well written issue here! Including a reproduction project and a very detailed explanation. This helps a log to understand what you're trying to do and to help you out!

I've converted this to a discussion in our Q&A section, because you already (correctly) pointed out, that this might be an issue with your setup.

Now to the problem at hand:
This is actually working as designed. In swift-log, formatting is done by the log handler. What you see when using the StreamLogHandler.standardOutput is done here. As soon as you use a different log handler (like the one CocoaLumberjack provides), this code is no longer executed.

You will nee…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ffried
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1388 on October 25, 2023 05:48.