Mercurial Hosting > luan
view src/goodjava/logger/DateLayout.java @ 2015:61b0cc7db09c default tip fixssl
Manually specify letsencrypt server due to acme default server change (to zerossl)
author | Violet7 |
---|---|
date | Sat, 27 Sep 2025 13:37:11 -0700 |
parents | 1cdc12cdcfa2 |
children |
line wrap: on
line source
package goodjava.logger; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public final class DateLayout implements Layout { private final Date date = new Date(); public final DateFormat dateFormat; public DateLayout(String pattern) { dateFormat = new SimpleDateFormat(pattern); } public synchronized String format(LoggingEvent event) { date.setTime(event.time); return dateFormat.format(date); } }