This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Logfile only written on shutdown Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Logfile only written on shutdown" Watch "Logfile only written on shutdown" New topic
Author

Logfile only written on shutdown

Vik Ve
Greenhorn

Joined: Jun 01, 2012
Posts: 1
Hey guys,
first i have to gratulate for this great board. You delivered many answers to questions i had. Unfortunately there seems to be no solution on the internet for the following problem:
I'm running JBoss 6.1 Final with it's built in logging service (which is not log4j anymore). Our application is writing things to the logging service, and these things appear in the console and in the log-file. Unfortunately does JBoss only write lines to the logfile, when i shutdown jboss. Before the file is empty (or only has the entries from the last shutdown).
How can I configure JBoss to write lines to the logfile, as they are printed on the console.

Here's a snippet of my jboss-logging.xml
---------------------------------------------
<file-handler
file-name="/var/log/jboss/logfile.log"
name="LOG_FILE"
autoFlush="true"
append="true">
<level name="INFO"/>
<error-manager>
<only-once/>
</error-manager>
<formatter>
<!-- <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/> -->
<pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
</formatter>
</file-handler>
Thomas Tamoniczi
Greenhorn

Joined: Apr 15, 2010
Posts: 6
Same problem for me, did you find a solution?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logfile only written on shutdown
 
Similar Threads
server.log in JBoss 6
Websphere 6.1 - Apache commons logging with log4j does not work
How to configure a separate log file(Log4j) for a specific application in JBoss?
log4j problem writing to a log file.
Query related to periodic-rotating-file-handler in jboss-logging.xml