Questions tagged [spring-logback]
288 questions
0
votes
1 answer
Is there any way to add mutiple patterns in logback.xml?
I'm working on logger implementation and trying to print logger statements in a different pattern using an ERROR level log.
This is the XML config using for printing loggers. Is there any way to add multiple patterns and print the statements based…

Giri
- 31
- 7
0
votes
1 answer
Spring Boot logback-spring.xml creates a log file under path /var/log even if custom log path is defined in the xml and application.properties files
I prepared a custom RollingFileAppender configuration in the logback-spring.xml file and application.properties files. The log file soduncu.log created under path /var/app/sefa/logs. This is expected behavior for the configuration but there is an…

soduncu
- 51
- 1
- 9
0
votes
1 answer
Give 754 linux file permission to java application log files generated through Spring Logback
In my Java Spring-based application, using Logback to generate application logs, I need to give specific 754 linux file permission to log files generated by this application.
How can specific file permissions of log files be set in…

Ishan Gandhi
- 47
- 1
- 9
0
votes
2 answers
How do we get user request, response, and request-id along with process-id in spring-boot logging using logback.xml and MDC?
I have been trying to create a logback.xml logging pattern for my spring-boot project in which I can get some requirements.
I want to print data in logging pattern (such as process-id, request-id, user request data for a particular API request,…

suv1sh
- 43
- 1
- 10
0
votes
1 answer
Logback using Springboot not accepting environment variables
I am trying to use an environment variable ($mode) in my logbook-spring.xml as below but logback is unable to read it:

Aamir Quraishi
- 144
- 1
- 12
0
votes
1 answer
Logback : enable class on specific appender et disable it on the others
A specific class from a dependency produces too much logs, so I'm trying to store them in a specific file to avoid pollution of the other ones.
here's my logback-spring.xml file :
…

Louisprrn
- 17
- 6
0
votes
2 answers
Logging Hibernate queries with parameter values in springBoot
I have set
logging.level.org.hibernate.type.descriptor.sql=trace
but it logs each variable binding as a separate line which, having average 50-60 columns per table makes log files harder to understand.
Is there a way to configure logger so that…

Smiley_nrk
- 1
- 2
0
votes
1 answer
How to log a table in the log file with logback?
I have a project which should print the result on the screen in the console and also to the file.
I use spring boot with logback.
I can print the result as a table on screen but not as a good format in the log file with logback. Any ideas…

itro
- 7,006
- 27
- 78
- 121
0
votes
1 answer
Logger is freezing during logger.info
My background job is (regularly) getting stuck when calling log.info(...) with Logback:
"pool-5-thread-1" #30 prio=5 os_prio=0 tid=0x00007f11c4ff2000 nid=0x100 waiting on condition [0x00007f11bd21a000]
java.lang.Thread.State: WAITING (parking)
…

Tom G
- 2,025
- 3
- 21
- 32
0
votes
1 answer
Spring Boot with Logback. Keep getting error and app is not starting
I'm fighting with this problem for 3 days now.
I have a Spring Boot 2.1.7 setup (very basic) with logback and lodash dependencies.
I'm trying to deploy my fat jar inside a docker image on Google Cloud Compute Engine.
I have the following…

Sniady
- 1,633
- 1
- 12
- 21
0
votes
0 answers
Not able to set different log level for my particular package
I expected to turn off logging for the package by setting level=OFF for my package.
However, I am not able to do it and logs are still added in the log file.
I have tried to