The configuration of the JCMS logs is located in the file /WEB-INF/data/log4j.xml
It is a configuration file Log4J
that follows the XML syntax described on the site (same http://logging.apache.org/log4j/2.x/manual/configuration.html#XML syntax as "log4net")
By default in JCMS we define the generic logs to WARN
and the JCMS logs to INFO
; a comment precedes each statement to indicate what it is about:
ROOT
(global default configuration): WARNjsp
: INFO : For all logs issued from a jsp, the name of the logger will be similar to the path of the jsp on which the request is made. For example, a log sent from the editor of an Article will be sent by the logger "jsp.types.Article.editArticle_jsp"custom
: INFO : Customgenerated
package classes: INFO: Generatedcom.jalios
classes: INFO: Jaliosjcmsplugin
internal classes: INFO : Module-specific logs (go back to the control interface of each module)
As a comment in the file are proposed to you :
org.hibernate.SQL
: DEBUG : to activate to see the SQL queries in the logscom.jalios.jcms
: JCMScom.jalios.util
core : Jalioscom.jalios.ldap
utility classes : LDAPcom.jalios.io
interface : reading/writing in the filecom.jalios.jstore
system : Storecom.jalios.jspengine
low-level layer : compiling jspcom.jalios.jcms.taglib
: layer managing jspcom.jalios.jcms.webdav
taglib : WebDAVjcmsplugin.VerbosePlugin
interface : generic example for specific logs issued from modules ; replace "VerbosePlugin" by the technical name of the module concerned
Based on the same principle as the proposed examples, you can add your own rules. Here are other examples of packages :
com.jalios.jdring
: scheduledcom.jalios.jcms.search
tasks manager : for searches in lucenecom.jalios.jcms.rest
: JCMScom.jalios.jcmsplugin.pdfconverter
REST interface : PDFcom.jalios.jcmsplugin.documentviewer
conversion module : document viewer modulecom.jalios.jcmsplugin.waffle
& : waffle.servlet
SSO Waffle module and its servlet : Asynchronous file processingcom.jalios.jcms.fileprocessor
engine (conversion, indexing, ...) Onexternal libraries, for example the C3P0 pool of connection in DEBUG mode
com.mchange.v2.c3p0
com.mchange.v2.resourcepool
Changing the level can often be done hot, i.e. without restarting the application.
In some rare cases, one may want to see in an exhaustive way all the information concerning the exchanges with the database. Here is how to proceed (note that the hot modification does not work in this case, be careful, the log files then quickly become very large)
<!-- trace all SQL requests sent by Hibernate (must be set to trace before loading) --> <logger name="org.hibernate.SQL"><level value="TRACE" /></logger> <!-- trace data bindings during SQL requests sent by Hibernate (must be set to trace before loading) --> <logger name="org.hibernate.type"><level value="TRACE" /></logger> <!-- reduce verbosity by assigning DEBUG instead of Trace for specific types --> <!-- <logger name="org.hibernate.type.BooleanType"><level value="DEBUG" /></logger> <logger name="org.hibernate.type.CollectionType"><level value="DEBUG" /></logger> <logger name="org.hibernate.type.DateType"><level value="DEBUG" /></logger> <logger name="org.hibernate.type.IntegerType"><level value="DEBUG" /></logger> <logger name="org.hibernate.type.LongType"><level value="DEBUG" /></logger> <logger name="org.hibernate.type.StringType"><level value="TRACE" /></logger> <logger name="org.hibernate.type.TextType"><level value="DEBUG" /></logger> <logger name="org.hibernate.type.TimestampType"><level value="DEBUG" /></logger> --> <!-- trace SchemaUpdate sent by Hibernate (must be set to trace before loading) --> <logger name="org.hibernate.tool.hbm2ddl.SchemaUpdate"><level value="TRACE" /></logger>