Skip to content
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

Will Logger.Message accept string interpolations? #1

Closed
ravikandhadai opened this issue Feb 28, 2019 · 2 comments
Closed

Will Logger.Message accept string interpolations? #1

ravikandhadai opened this issue Feb 28, 2019 · 2 comments

Comments

@ravikandhadai
Copy link
Contributor

extension Logger {
public struct Message: ExpressibleByStringLiteral, Equatable, CustomStringConvertible {
public typealias StringLiteralType = String
private var value: String
public init(stringLiteral value: String) {
self.value = value
}
public var description: String {
return self.value
}
}
}

@weissi Should Logger.Message conform to ExpressibleByStringInterpolation? I wonder if you can pass a string interpolation for logging with this definition?

@weissi
Copy link
Member

weissi commented Mar 1, 2019

@ravikandhadai thank you! Yes, it totally needs to do that. I copied the definition from struct Logger.MetadataValue: ExpressibleByStringLiteral which defined the ExpressibleByStringInterpolation in a separate conformance 🙈. Fixed now (and tested).

@weissi weissi closed this as completed Mar 1, 2019
@weissi
Copy link
Member

weissi commented Mar 1, 2019

--> 7dd7738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants