Questions tagged [apache-commons-logging]

Apache Commons Logging is a logging facade for the Java programming language.

Apache Commons Logging is a component of the Apache Commons project. Apache Commons Logging is a logging facade, is open source software distributed under the Apache License, Version 2.0, and provides a common API for use with several logging implementations, including log4j and Java Logging.

This logging facade allows the logging implementation to be chosen at runtime yet allows all logging development to be done against a single API.

Related Tags

231 questions
0
votes
1 answer

Java using multiple logger types in the same file skipping log statements

There is an maven OSGI component in which I have a call to EclipseStarter.stop() statement which shuts down the OSGI framework. There are a couple of log statements printed after this line. I have used pax-logging with log4j2 as the logging backend…
0
votes
2 answers

How to set up logging.properties for HTTPBuilder in Java

I'm trying to get the logs of my connection with HTTP Builder. I read a lot and heard to set up a configuration file. I'm executing my jar from the terminal with this command java -jar -Djava.util.logging.config.file=logging.properties…
0
votes
2 answers

Using ServiceLoader for log4j-jcl brigde in OSGi environment

I am trying to use the log4j-jcl bridge in osgi mode and found that the java.util.ServiceLoader should be used to get the LogFactoryImpl from the bridge jar. I am new to OSGi and so tried it after referring to a few tutorials but it doesn't seem to…
Asma Zinneera Jabir
  • 801
  • 3
  • 13
  • 31
0
votes
1 answer

How to forward java.util.log to apache commons logging?

we use apache commons logging for our logging. However now we are consuming an OSS lib that is using java.util logging. how do I get java.util log statements invoked by the lib to show up in our apache commons log4j log file?
feroze
  • 7,380
  • 7
  • 40
  • 57
0
votes
1 answer

Enhanced code coverage with Commons logging and Log4j 2.0

I'm currently migrating from Log4j 1.2 to Log4j 2. We use Apache Commons Logging 1.1 (JCL), with Log4j2 as implementation. Now when executing unit tests, statements like if (log.isInfoEnabled()) { log.info("example"); } will show up as…
user3001
  • 3,437
  • 5
  • 28
  • 54
0
votes
1 answer

In Grails 3.1.x, how do I configure grails logging to include the class name in the logging statement?

The class that gets printed is the logger's class, not the class that contains the log statement. logback pattern: pattern = "%date{ISO8601} [%level] %class{100} %msg%n" Calling logger in MyController.class: log.info("Some message); results…
Ed J
  • 2,466
  • 4
  • 26
  • 20
0
votes
1 answer

How to print custom-fields into a log file from java application with the help of log4j2 JSON technique?

I am looking for to print-out a log in a custom manner. For example, currently we have following log structure in form of JSON, { "timeMillis" : 1488791217953, "thread" : "restartedMain", "level" : "DEBUG", "loggerName" :…
Vishal Gajera
  • 4,137
  • 5
  • 28
  • 55
0
votes
2 answers

Malformed \uxxxx encoding with Java Web Start and apache.commons-logging

I'm trying to migrate a Java applet to Java Web Start. Therefore, I call the applet with the following jnlp-file: title
Jakob
  • 1,156
  • 3
  • 15
  • 26
0
votes
1 answer

Getting to see Commons Logging debug messages in J2SE app

In a standalone J2SE application I'm using some library code that uses Log.debug from Commons Logging to output some debug information. My app currently has no logging configuration whatsoever. By default I see some log messages in stdout, but not…
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
0
votes
0 answers

SLF4J not logging properly on remote machine

I have a strange issue with SLF4J. I have this logging configuration: ##################### # Loggers ##################### log4j.rootLogger = INFO, LOGFILE log4j.logger.ACCESS_LOG=INFO, ACCESS_LOG log4j.logger.METRICS=ERROR,…
Waffles
  • 349
  • 1
  • 8
  • 19
0
votes
2 answers

Resolving NoClassDefFoundError

I am trying to learn spring. So I typed up this project but on running it it gives me this error Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at…
leoOrion
  • 1,833
  • 2
  • 26
  • 52
0
votes
0 answers

Spring framework: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory ,despite adding commons-logging-1.2 jars in classpath

I am new to Spring framework. I checked the following answer regarding the similar problem as i have :Getting java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory exception But,i have tried all the solutions mentioned in that…
Deen John
  • 3,522
  • 4
  • 29
  • 32
0
votes
1 answer

Alternative for commons-logging-1.2.jar to be added in pom.xml file for Log4j to avoid org.apache.commons.logging.LogFactory ClassNotFoundException

Alternative for commons-logging-1.2.jar to be added in pom.xml file for Log4j logging Framework to avoid below error from displaying: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException:…
0
votes
1 answer

log4j socketappender not generating messages when using commons logging

I am trying to stream some logging messages from an application that is a bit of a black box to me. It is packaged with commons-logging-1.0.4.jar and is using log4j underneath it. I am trying to stream one of the loggers so I can view it in…
Jeff Gaer
  • 134
  • 1
  • 11
0
votes
1 answer

Slf4j vs JCL - Binding method

Could someone explain to me the difference between the discovery & binding methods followed by the slf4j & jcl. There are just one or two documents available online & I am unable to exactly understand the difference. Seems like JCL tries to look for…
AgentX
  • 1,402
  • 3
  • 23
  • 38