<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">I always use `NSLog(&quot;Update name for user %@&quot;, 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">&lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt;</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:&#39;anonymous pro&#39;;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">&quot;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">&quot;</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:&#39;anonymous pro&#39;;color:rgb(180,38,26)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><br></span></p>Produces the warning: &quot;note: use &#39;String(describing:)&#39; to silence this warning&quot;<p style="margin:0px;font-size:11px;line-height:normal;font-family:&#39;anonymous pro&#39;;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:&#39;anonymous pro&#39;;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:&#39;anonymous pro&#39;"><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)">&quot;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)">&quot;</span><span style="font-variant-ligatures:no-common-ligatures">)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:&#39;anonymous pro&#39;;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>