diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/logging/structured/otherformats/MyCustomFormat.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/logging/structured/otherformats/MyCustomFormat.kt new file mode 100644 index 00000000000..fda3abb3571 --- /dev/null +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/logging/structured/otherformats/MyCustomFormat.kt @@ -0,0 +1,12 @@ +package org.springframework.boot.docs.features.logging.structured.otherformats + +import ch.qos.logback.classic.spi.ILoggingEvent +import org.springframework.boot.logging.structured.StructuredLogFormatter + +class MyCustomFormat : StructuredLogFormatter { + + override fun format(event: ILoggingEvent): String { + return "time=${event.instant} level=${event.level} message=${event.message}\n" + } + +}