<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks. It's a good news for me.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
When will version 2.0 be released? <span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Are there any specific plans? </span><span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">I
think a lot of users are waiting for the official release.</span></div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> slf4j-dev <slf4j-dev-bounces@qos.ch> 代表 Federico Fissore <federico@fissore.org><br>
<b>发送时间:</b> 2019年4月19日 14:35<br>
<b>收件人:</b> slf4j developers list<br>
<b>主题:</b> Re: [slf4j-dev] Add Supplier args methods for Logger on java 8.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Support for lazy arguments evaluation should be part of slf4j 2.0<br>
<br>
<a href="https://github.com/qos-ch/slf4j/pull/203">https://github.com/qos-ch/slf4j/pull/203</a><br>
<br>
If you want to have it with current slf4j 1.x you can give slf4j-fluent <br>
a try<br>
<br>
<a href="https://github.com/ffissore/slf4j-fluent">https://github.com/ffissore/slf4j-fluent</a><br>
<br>
cheers<br>
<br>
federico<br>
<br>
JICHUN LIU ha scritto il 19/04/19 alle 15:55:<br>
> <br>
> Hello.<br>
> <br>
> The java.util.function.Supplier is supported from Java 8.<br>
> <br>
> Some new methods like:<br>
> <br>
> <br>
> public void debug(String format, Supplier<Object> argument);<br>
> <br>
> public void debug(String format, Supplier<Object>... arguments);<br>
> <br>
> may add to org.slf4j.Logger.<br>
> <br>
> Lazy computing improves performance.<br>
> <br>
> Old:<br>
> <br>
> log.info("INFO a {} b {}",JsonUtil.ObjectToJson(instance),"success");<br>
> <br>
> <br>
> New:<br>
> <br>
> log.info("INFO a {} b {}",()->JsonUtil.ObjectToJson(instance),"success");<br>
> <br>
> <br>
> The new one with better performance because the ObjectToJson called only <br>
> on the info level or high.<br>
> <br>
> I found slf4j support jdk version older the 8. Maybe we can create a new <br>
> module for JDK 8. Supplier on slf4j is really an exciting feature.<br>
> <br>
> Thanks!<br>
> <br>
> _______________________________________________<br>
> slf4j-dev mailing list<br>
> slf4j-dev@qos.ch<br>
> <a href="http://mailman.qos.ch/mailman/listinfo/slf4j-dev">http://mailman.qos.ch/mailman/listinfo/slf4j-dev</a><br>
> <br>
<br>
_______________________________________________<br>
slf4j-dev mailing list<br>
slf4j-dev@qos.ch<br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-dev">http://mailman.qos.ch/mailman/listinfo/slf4j-dev</a></div>
</span></font></div>
</div>
</body>
</html>