-
Notifications
You must be signed in to change notification settings - Fork 476
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
I suggest to update the README page. #213
Comments
I also try to use one tag without In readme there is
|
Me too would love to have the opportunity to add simple tags without obfuscating code too much with long and complex log messages, for example: log.debug("A tagged log message", .sensitive) That is: not having to use the site long "userInfo: [Tag.sometag | Dev.somedeveloper ]". If anyone knows a clean and elegant way to achieve this, this would in my opinion be a very nice addition to XCGLogger. |
I have made a PR #222 long time ago I keep some code for a following PR after the first one merged, that I commit after see @hk05 your message However to achieve what @hk05 want
then we could duplicate all log functions of logger using extension XCGLogger {
open func debug(_ closure: @autoclosure () -> Any?, functionName: StaticString = #function, fileName: StaticString = #file, lineNumber: Int = #line, userInfo: Tag = .none) {
self.logln(.debug, functionName: functionName, fileName: fileName, lineNumber: lineNumber, userInfo: userInfo, closure: closure) // userInfo.dictionary with current master code
}
} |
log.debug("A tagged log message", userInfo: Dev.dave | Tag.sensitive)
That's somehow will confuse the user who only advantages one kind of Tag.
Then I suggest appending one demo code as below for that scenario.
log.debug("A tagged log message", userInfo: Tag.sensitive.dictionary)
The text was updated successfully, but these errors were encountered: