top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Application logs are not getting logged in the logs defined in jboss 7.0.2

+2 votes
682 views

I am using the below appenders in my domain.xml file to point all the logs from my application to app.log. I see the file is getting created but there are no logging happening.

 <periodic-rotating-file-handler name="CACHE-FILE" autoflush="true">
            <level name="DEBUG"/>
            <formatter>
               <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
            </formatter>
            <file relative-to="jboss.server.log.dir" path="app.log"/>
            <suffix value=".yyyy-MM-dd"/>
            <append value="true"/>
         </periodic-rotating-file-handler>

           <logger category="com.abc.cache" use-parent-handlers="false">
               <level name="DEBUG"/>
               <handlers>
                  <handler name="CACHE-FILE"/>
               </handlers>
           </logger>
posted May 7, 2013 by Pavithra Shenoy

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Is this version specific problem i.e. 7.0.2 or this problem is with other version too. It has been seen when you upgrade the version then there is a issue with logging which was working in earlier version.
Check if you have same issue like
http://stackoverflow.com/questions/10799028/jboss-7-1-logging-is-not-working
it is specific to 7.0.2 version.
Even after configuring separate appenders, logs are not generated.
Correct it worked for me in jboss 7.1

Similar Questions
+1 vote

What are the JBOSS JBPM (Open Source Business Process Management) Feature?

+1 vote

I need to configure Jboss clustering , i tried to apply it in the same server but i couldn't perform Failover
so now i'm trying two different ips at different machines , what should I do exactly?

+1 vote

My development setup is Win7 while my production is RHEL6. Both of the environments have the same settings in conf/logging.properties but the files in logs/ are slightly different.

The access logs are named the same way. But on RHEL there's no tomcat7-stdout or tomcat7-stderr log files. Just 'catalina.out.YEAR.MO.DY' and the cumulative "catalina.out" with no date.

What accounts for the differences? Also, how would you stop logging to the 'catalina.out' file. It gets unusably gigantic within a few days.

+2 votes

My Apache server host few applications something like :

/var/www/A
/var/www/B

I would like to trace access for a specific application, eg. A. Is it possible?

Or should I use 'LogLevel info' and so log all applications into access.log file (then parsing for specific web page) ?

My config for logging is :

..
ErrorLog /var/log/apache2/error.log
LogLevel info
CustomLog /var/log/apache2/access.log combined
..
+4 votes

I have an application which sets up logging after parsing the args in the main() funktion. It needs to be setup after parsing the args because I can set the loglevel via commandline flags.

I have tried many variants on how to do that but every time with an weird result. What I want is logging in from all libs and really understand that doing this should be enough there:

from logging import getLogger

logger = getLogger(__name__)

But, I need to setup the logger in the main() function to log only to a file and not to console because my application has an own shell interface which should not be spammed with log messages - never a message should show up there.

I think it should be only some few lines of code but I can't figure that out. The logger should be configured to have a max file size and rotate logfiles. Can someone help me with this?

...