apple / swift-log

A Logging API for Swift
https://apple.github.io/swift-log/
Apache License 2.0
3.48k stars 284 forks source link

patch: Replace standardOutput to standardError #295

Closed ayushi2103 closed 4 months ago

ayushi2103 commented 4 months ago

This change updates SwiftLog to direct log messages to the standard error stream (stderr) instead of the standard output stream (stdout).

Motivation:

Standard output is used to print the results from the program to the output, while standard error is used to print the error stream separately. The change also increases readability of logs by keeping them separate from regular output.

Modifications:

I changed the initialization of the _factory property from using StreamLogHandler.standardOutput to StreamLogHandler.standardError

Result:

After this change, log messages produced by SwiftLog will be directed to the standard error stream (stderr) instead of the standard output stream (stdout).

FranzBusch commented 4 months ago

@swift-server-bot test this please

weissi commented 4 months ago

@swift-server-bot test this please

weissi commented 4 months ago

@swift-server-bot add to allowlist