summaryrefslogtreecommitdiff
path: root/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/LoggingProperties.java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/LoggingProperties.java')
-rw-r--r--eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/LoggingProperties.java94
1 files changed, 94 insertions, 0 deletions
diff --git a/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/LoggingProperties.java b/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/LoggingProperties.java
new file mode 100644
index 00000000..b3d5d846
--- /dev/null
+++ b/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/LoggingProperties.java
@@ -0,0 +1,94 @@
+package at.gv.egiz.eaaf.utils.springboot.ajp.logging;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * Logger configuration for embedded Tomcat.
+ *
+ * @author BRZ development team
+ * @author tlenz
+ *
+ */
+@ConfigurationProperties(prefix = "logging")
+@Getter
+@Setter
+public class LoggingProperties {
+ /**
+ * Whether to log in JSON format.
+ */
+ private boolean json = true;
+ /**
+ * Whether to log in plain text.
+ */
+ private boolean text = false;
+ /**
+ * Default Logback Pattern.
+ */
+ private String pattern = "### unused property ###";
+ /**
+ * Logback Mapped Diagnostic Context.
+ */
+ private Mdc mdc = new Mdc();
+
+ /**
+ * Logback Mapped Diagnostic Context.
+ */
+
+ @Getter
+ @Setter
+ public static class Mdc {
+ /**
+ * Whether to use Logback's MDC.
+ */
+ private boolean enabled = false;
+ /**
+ * List of HTTP Headers to make available in Logback's MDC.
+ */
+ private List<String> headers = Collections.emptyList();
+ private String headerPrefix = "";
+ private String headerPostfix = "";
+ /**
+ * List of HTTP Cookies to make available in Logback's MDC.
+ */
+ private List<String> cookies = Collections.emptyList();
+ private String cookiePrefix = "";
+ private String cookiePostfix = "";
+ /**
+ * List of HTTP Session Attributes to make available in Logback's MDC.
+ */
+ private List<String> sessionAttributes = Collections.emptyList();
+ private String sessionAttributePrefix = "";
+ private String sessionAttributePostfix = "";
+ /**
+ * Value to use if a configured MDC entry would be null.
+ */
+ private String nullValue = null;
+ }
+
+ /**
+ * Tomcat AccessLog.
+ */
+ private AccessLog accessLog = new AccessLog();
+
+ /**
+ * Tomcat AccessLog.
+ */
+ @Getter
+ @Setter
+ public static class AccessLog {
+ /**
+ * Enable AccessLog.
+ */
+ private boolean enabled = false;
+ /**
+ * Logback access log filename.
+ */
+ private String filename = "logback-access.xml";
+ }
+}