I want to have my string added as prefix to every logging message in app. I mean, I have several java apps, and I want one to have some prefix in message like:
DATE, INFO(or other), [sample] (-->this is my added string) , rest of standard message
I have seen a several tutorials, but none of them worked properly for me. I have already included dependency in pom:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
Do you have any trick or simple solution for that? To write some kind of wrapper, or configuration class?