You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@empire-db.apache.org by Victor Rojo <vi...@asteriscogato.com> on 2009/11/13 06:04:17 UTC

Logging configuration

Hi there!

I started to explore EmpireDB and it is less difficult to use than
traditional and esoteric ORM tools.

Currently I'm facing a problem: how do you configure the logging levels?

I hope your next release can contain the CodeGenerator!

 

Regards,

Victor Rojo

 


re: Logging configuration

Posted by Rainer Döbele <do...@esteam.de>.
Hi Victor,

glad that you like our solution.

We use log4j for logging hence in order to see how to adjust log4j logging levels you can read their documentation.

A elegant way to do it however, is how we do it in our examples (see empire-db-example-basic or empire-db-example-advanced).
Those projects have a config.xml file that holds the configuration.
Down the end of the file you see a node like this
	<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
Below that you will find the log4j configuration.

In order to apply this configuration the samples define a configuration bean derived from org.apache.empire.xml.XMLConfiguraiton and create an instance of it. On this object you must then call the init() method and supply it with the filename of your configuration file (e.g. config.xml). The third param is a Boolean that specifies whether to look for the log4j:configuration node and apply the configuration.

For further details see the log4j documentation.

Regards

Rainer



Victor Rojo wrote:
> re: Logging configuration
>
> Hi there!
> I started to explore EmpireDB and it is less difficult to use than traditional and esoteric ORM tools.
> Currently I'm facing a problem: how do you configure the logging levels?
> I hope your next release can contain the CodeGenerator!
>
> Regards,
> Victor Rojo