diff --git a/de.srsoftware.logging/src/main/java/de/srsoftware/logging/ColorLogger.java b/de.srsoftware.logging/src/main/java/de/srsoftware/logging/ColorLogger.java index 7fa8eeb..04ac46b 100644 --- a/de.srsoftware.logging/src/main/java/de/srsoftware/logging/ColorLogger.java +++ b/de.srsoftware.logging/src/main/java/de/srsoftware/logging/ColorLogger.java @@ -4,6 +4,7 @@ package de.srsoftware.logging; import static de.srsoftware.logging.ConsoleColors.*; import static java.lang.System.Logger.Level.*; +import java.text.DateFormat; import java.text.MessageFormat; import java.text.SimpleDateFormat; import java.util.Date; @@ -12,6 +13,9 @@ import java.util.ResourceBundle; public class ColorLogger implements System.Logger { private final String name; private static int rootLevel = INFO.getSeverity(); + private static DateFormat TIME = new SimpleDateFormat("hh:mm:ss.SSS"); + private static DateFormat DATE = new SimpleDateFormat("yyyy-MM-dd"); + private static String lastDate = null; public ColorLogger(String name) { this.name = name; @@ -50,7 +54,12 @@ public class ColorLogger implements System.Logger { private static String colorize(String message, int severity) { var color = severity >= ERROR.getSeverity() ? RED : severity >= WARNING.getSeverity() ? YELLOW : severity >= INFO.getSeverity() ? WHITE_BRIGHT : WHITE; var date = new Date(); - var FORMAT = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS"); - return WHITE + FORMAT.format(date) + " " + color + message + RESET; + var day =DATE.format(date); + StringBuilder sb = new StringBuilder(); + if (!day.equals(lastDate)){ + lastDate = day; + sb.append(WHITE).append(day).append("\n"); + } + return sb.append(WHITE).append(TIME.format(date)).append(" ").append(color).append(message).append(RESET).toString(); } } diff --git a/de.srsoftware.oidc.web/src/main/resources/de/clients.html b/de.srsoftware.oidc.web/src/main/resources/de/clients.html index 21e9c6d..92bbb70 100644 --- a/de.srsoftware.oidc.web/src/main/resources/de/clients.html +++ b/de.srsoftware.oidc.web/src/main/resources/de/clients.html @@ -1,36 +1,35 @@ - - - Light OIDC - - - - - - - -

Clients

-
- bei LightOIDC registrierte Clients: - - - - - - - - - - - - - -
ClientIDWeiterleitungs-URLsAktionen
- -
- -
- - \ No newline at end of file + + + Light OIDC + + + + + + + +

Clients

+ +
+ bei LightOIDC registrierte Clients: + + + + + + + + + + + + + +
ClientIDWeiterleitungs-URLsAktionen
+ +
+ +
+ + diff --git a/de.srsoftware.oidc.web/src/main/resources/en/clients.html b/de.srsoftware.oidc.web/src/main/resources/en/clients.html index 918db33..296ebef 100644 --- a/de.srsoftware.oidc.web/src/main/resources/en/clients.html +++ b/de.srsoftware.oidc.web/src/main/resources/en/clients.html @@ -1,38 +1,36 @@ - - - Light OIDC - - - - - - - -

Clients

- Umbrella + + + Light OIDC + + + + + + + +

Clients

-
- These are clients that are registered with LightOIDC: - - - - - - - - - - - - - -
ClientIDRedirect URLsActions
- -
- -
- +
+ These are clients that are registered with LightOIDC: + + + + + + + + + + + + + +
ClientIDRedirect URLsActions
+ +
+ +
+ Umbrella + \ No newline at end of file