Tech-Today
How to create size-rotating-file handler in JBoss 7.2 using CLI
There are times when we require a size-rotating-file handler over the default periodic-rotating-file handler. Simply changing the properties in standalone.xml won't do because it will cause synch problem with logging.properties. So to do so we need to execute a series of JBoss cli commands.
First you need to run: jboss_home/standalone/bin/jboss-cli.sh and connect.
//remove the default file handler
/subsystem=logging/periodic-rotating-file-handler=FILE:remove
//create the new file handler
/subsystem=logging/size-rotating-file-handler=FILE:add(file={"path"=>"server.log", "relative-to"=>"jboss.server.log.dir"})
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="autoflush", value="true")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="level", value="WARN")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="append", value="true")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="max-backup-index", value="10")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="rotate-size", value="5000k")
References:
https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Configure_a_Periodic_Log_Handler_in_the_CLI1.html
https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Sample_XML_Configuration_for_a_Size_Log_Handler.html
-
How To Display An Alert View With Swift
Display an Alert View with Swift First we'll create a constant of UIAlertController. Since we'll be using an alert, the UIAlertControllerStyle is set to default. It can have other values such as ActionSheet, Alert, and RawValue. let alertPrompt...
-
Javaee Development
JavaEE6How to create a javaee6 web app using jboss maven war archetypeCreate a simple javaee6 web app with maven, glassfish and postgresqlHow to validate a JavaEE6 Bean in a jobHow to add JavaEE 6 archetypes in eclipse keplerHow to create a custom bean...
-
How To Setup Stomp In Jboss As 7 And Create A Java Client Call
This tutorial will teach us how we can enable stomp in JBoss 7.1.3 and create a sample java client call. What you need: 1.) JBoss AS7.1.3 2.) standalone-full.xml - this is where we will copy the settings Setup JBoss AS 7 1.) 1.) Add extension:...
-
How To Install Logback Logger In Glassfish 3.1.1
How to install Logback Logger in Glassfish 3.1.1 1.) Download the ff jars: a.) slf4j-api.jar b.) jul-to-slf4j.jar c.) logback-classic.jar d.) logback-core.jar 2.) Copy the jars mentioned above in {glassfish_home}/glassfish/lib/endorsed. 3.) Modify...
-
How To Enable Slf4j Logging In Glassfish 3.1.1
This blog entry will try to setup slf4j as the main logger for glassfish 3.1.1 What you need: 1.) Glassfish 3.1.1 (zipped) 2.) Download the ff jars: a.) slf4j-api.jar b.) jul-to-slf4j.jar c.) logback-classic.jar...
Tech-Today