|
@@ -73,6 +73,7 @@ import java.nio.file.Path;
|
73
|
73
|
import java.nio.file.Paths;
|
74
|
74
|
import java.text.DateFormat;
|
75
|
75
|
import java.text.SimpleDateFormat;
|
|
76
|
+import java.time.format.DateTimeFormatter;
|
76
|
77
|
import java.util.ArrayList;
|
77
|
78
|
import java.util.Collection;
|
78
|
79
|
import java.util.Collections;
|
|
@@ -275,13 +276,10 @@ public class LoggingManager implements ConfigChangeListener {
|
275
|
276
|
@Handler
|
276
|
277
|
public void handleChannelGotTopic(final ChannelGotTopicEvent event) {
|
277
|
278
|
final String filename = locator.getLogFile(event.getChannel());
|
278
|
|
- final DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
|
279
|
|
- final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
|
280
|
|
-
|
281
|
279
|
appendLine(filename, "*** Topic is: %s", event.getTopic().getTopic());
|
282
|
280
|
appendLine(filename, "*** Set at: %s on %s by %s",
|
283
|
|
- timeFormat.format(event.getTopic().getDate()),
|
284
|
|
- dateFormat.format(event.getTopic().getDate()),
|
|
281
|
+ event.getTopic().getDate().format(DateTimeFormatter.ofPattern("HH:mm:ss")),
|
|
282
|
+ event.getTopic().getDate().format(DateTimeFormatter.ofPattern("dd/MM/yyyy")),
|
285
|
283
|
event.getTopic().getClient()
|
286
|
284
|
.map(GroupChatUser::getNickname).orElse("Unknown"));
|
287
|
285
|
}
|