<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">I always use `NSLog("Update name for user %@", fbUser)`. Is `Log.info` your own implementation?</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div><div class="gmail_default" style="font-family:georgia,serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 5, 2017 at 10:26 PM, Maxim Veksler via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Swift 3.1 compiler seems to introduces a new complier warning regarding String(describing: )</div><div><br></div><div>So this line:</div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:'anonymous pro';color:rgb(180,38,26)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)">Log</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">.</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)">info</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(</span><span style="font-variant-ligatures:no-common-ligatures">"Update name for user </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">\</span><span style="font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">fbUser</span><span style="font-variant-ligatures:no-common-ligatures">)</span><span style="font-variant-ligatures:no-common-ligatures">"</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:'anonymous pro';color:rgb(180,38,26)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><br></span></p>Produces the warning: "note: use 'String(describing:)' to silence this warning"<p style="margin:0px;font-size:11px;line-height:normal;font-family:'anonymous pro';color:rgb(180,38,26)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:'anonymous pro';color:rgb(180,38,26)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"></span></p>and becomes this line</div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:'anonymous pro'"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)">Log</span><span style="font-variant-ligatures:no-common-ligatures">.</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)">info</span><span style="font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,38,26)">"Update name for user </span><span style="font-variant-ligatures:no-common-ligatures">\</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,38,26)">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,149,175)">String</span><span style="font-variant-ligatures:no-common-ligatures">(describing: fbUser)</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,38,26)">)</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,38,26)">"</span><span style="font-variant-ligatures:no-common-ligatures">)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:'anonymous pro';color:rgb(180,38,26)"><br></p>This new syntax is not very sexy, especially for logging. Any suggestions, possibility on the API end of Log to make this warning go away? or write it differently.<br></div></div>
<br>______________________________<wbr>_________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div>