We are developing a Multi Tenant Application. I want to add the tenant name before each log message
.... [liquiforce] New User John Kid created
..... [moreiq] Fetched 4 Samples for Project 12
In the above example the
- "..." denotes the usual time stamp, process id, log level, class names e.g 2016-03-28 21:15:35.219 WARN 8 --- [ main] d.s.r.o.OperationImplicitParameterReader :
- [liquiforce] is my tenant name. The first log is from an action from liquiforce tenant and second from moreiq tenant
- I will be referring to the tenant information from the SecurityContext of Spring
This is all part of spring boot which uses default logback logging.
Cheers, Rohit