log.info()傳入多個參數的方法

<div id="content_views" class="markdown_views"> <!-- flowchart 箭頭圖標 勿刪 --> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path> </svg> <p><img src="https://img-blog.csdn.net/20180502181819678?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0hlYXREZWF0aA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70" alt="這裏寫圖片描述" title=""></p>web

<p>不知道項目裏用的是啥 ** 版本的 log4j</p>markdown

<p>竟然不能傳入變長參數</p>svg

<p><img src="https://img-blog.csdn.net/2018050218194283?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0hlYXREZWF0aA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70" alt="這裏寫圖片描述" title=""></p>spa

<pre class="prettyprint" name="code"><code class="hljs perl has-numbering" onclick="mdcp.signin(event)" style="position: unset;">logger.info(String.<span class="hljs-keyword">format</span>(<span class="hljs-string"><span class="hljs-string">"</span><span class="hljs-variable"><span class="hljs-string">%s</span></span><span class="hljs-string"> </span><span class="hljs-variable"><span class="hljs-string">%s</span></span><span class="hljs-string"> </span><span class="hljs-variable"><span class="hljs-string">%s</span></span><span class="hljs-string">"</span></span>, username, feature, <span class="hljs-string"><span class="hljs-string">"1111"</span></span>));<div class="hljs-button signin" data-title="登陸後複製"></div></code></pre>.net

<p>只好採用這種方式啦</p> 原文地址:https://blog.csdn.net/HeatDeath/article/details/80170008 </div>code

相關文章
相關標籤/搜索