Questions tagged [spring-logback]

288 questions
0
votes
1 answer

how to write only program specific logs to file in spring batch with spring boot

I have developed spring batch multifile processor. Now requirement is to write all program specific logs like for example: logger.info(" this is reader reading employee record:" employee.toString); logger.info(" this is processor…
0
votes
1 answer

Configure Logback under Spring using Java and Not XML

Under Spring[Boot], how do you configure Logback programmatically either using JavaConfig or some kind of Annotation-based configuration. I wish to avoid XML files as much as possible Examples are welcome I am NOT looking for links to the…
user1445967
  • 1,520
  • 4
  • 14
  • 30
0
votes
1 answer

Spring Active Profile not being picked in logback-spring.xml

I have a logback-spring.xml as below:
Rips
  • 1,964
  • 1
  • 23
  • 45
0
votes
0 answers

spring boot actuator calling /actuator/logfile endpoint returning 500 with java.util.HashMap cannot be cast to org.springframework.core.io.Resource

As per the error its looking like it found the log file but before returning it is failing during some conversion. application.yml logging: path: logs file: ${logging.path}/api.log management: endpoints: logfile:…
iBabur
  • 974
  • 12
  • 13
0
votes
2 answers

spring cloud sleuth cannot geerate spanID

it is necessary to generate a span-id for all that gets into the console log, but unfortunately the span-id is not generated: 2019-03-13 12:35:27.116 INFO [core.data,,,] 13304 --- [ main] s.c.a.AnnotationConfigApplicationContext :…
0
votes
1 answer

Detect Cloud Platform in LogBack for Spring Boot Application

We want to develop a core module using Spring Boot which has robust support for Logger with multiple cloud providers. Hence, we choose to develop it using Spring LogBack. Let's say if we have PCF or GCP as cloud platform, how can i enable the…
S Atah Ahmed Khan
  • 1,313
  • 3
  • 14
  • 22
0
votes
1 answer

Spring Boot :Logback not picking values from application.properties

I am trying to log the properties mentioned in application.properties using logback. application.properties appName=myservice logging.pattern.console=%d{HH:mm:ss.SSS} [%thread] %appName %-5level - %msg%n %ex tried the above pattern and got the…
Rajeev Akotkar
  • 1,377
  • 4
  • 26
  • 46
0
votes
1 answer

Logback - Different log file path base on the application profile

I am trying to use logback.xml for my project and for development i am using windows env and for deployment i am using unix env so i have created below xml file. However when my application starts look like it's trying to validate the path…
Jigar Naik
  • 1,946
  • 5
  • 29
  • 60
0
votes
1 answer

Is there a way to provide Slueth the spring application name other than specifying that in bootstrap.properties of Spring boot application?

As per this guidelines, one has to specify application name in bootstrap.properties if using custom logback.xml. I was wondering if there's any way where I can hardcode the application name in logback.xml instead of creating the bootstrap.properties…
0
votes
1 answer

spring boot logback not logging my application logs

Need help... what am I doing wrong here??? I believe it does read the path and file name from application.properties file. But I don't think it reads the logback.xml or logback-spring.xml I did some research and found many questions/answers. But I…
SK.
  • 1,390
  • 2
  • 28
  • 59
0
votes
2 answers

How to disable Spring async logging with logback

I am using spring boot for service development and logback for logging using slf4j I have Async annotation on one of my classes that sometimes throws errors and logs them. I don't want to log such error created by Async and would want to suppress…
Ray S
  • 569
  • 1
  • 8
  • 18
0
votes
1 answer

How to configure settings for logback using java class instead of xml file

I am new with topic Log and tried to use logback to log the necessary information in my application. I found in internet that I can configure the log using xml file like this:
Bali
  • 705
  • 4
  • 13
  • 21
0
votes
1 answer

Spring-boot with logback printing some system logs into Application log

I previously has issue,while application printing all logs in console. Then after following some post I was able to print the logs into separate application log. Now while restarting application server (IBM WAS 8.5) it is printing some SystemOut…
0
votes
0 answers

Can I use Springs JpaRepository to retrieve Logback LoggingEvent records that have been appended using DBAppender

The spring-boot application I'm working on uses Logback's classic DBAppender to add log entries to a (Postgres) database. I would like to access these records, preferably using a JpaRepository for LoggingEvent. I've tried creating my own…
Chris
  • 409
  • 3
  • 17
0
votes
1 answer

Shutdownhook - Log not printed in console/File @Predestroy method

Hav spring boot application, While invoking Shutdown hook @Predestroy method is called and application shutdown happens. But Logs are not printed in both console and file, sys out line after the log is printed. It seems, Looger console shutdown…
Jessie
  • 963
  • 5
  • 16
  • 26
1 2 3
19
20