... | @@ -48,12 +48,12 @@ The **classifier** property allows to look for a specific flavour of the **2.8.0 |
... | @@ -48,12 +48,12 @@ The **classifier** property allows to look for a specific flavour of the **2.8.0 |
|
## Logging
|
|
## Logging
|
|
Logging is an essential component in every software related product. Log files are an essential tool in understanding what is going on during runtime inside an application, especially to figure out what went wrong when your application fails. TULIP relies on the abstract [Simple Logging Facade for Java](http://www.slf4j.org/) logging facade, in combination with the [log4j](https://logging.apache.org/log4j/2.x/) as a logging framework for logging.
|
|
Logging is an essential component in every software related product. Log files are an essential tool in understanding what is going on during runtime inside an application, especially to figure out what went wrong when your application fails. TULIP relies on the abstract [Simple Logging Facade for Java](http://www.slf4j.org/) logging facade, in combination with the [log4j](https://logging.apache.org/log4j/2.x/) as a logging framework for logging.
|
|
|
|
|
|
### log4j.xml
|
|
### log4j2.xml
|
|
Configuration of how and what is being logged is defined in a dedicated configuration file named **log4j.xml**
|
|
Configuration of how and what is being logged is defined in a dedicated configuration file named **log4j2.xml**
|
|
<div align="center">
|
|
<div align="center">
|
|
<figure>
|
|
<figure>
|
|
<img src="uploads/0de8da25be1f2ca918621fd434e90fd4/log4jXML.png" width="66%" height="66%">
|
|
<img src="uploads/0de8da25be1f2ca918621fd434e90fd4/log4jXML.png" width="66%" height="66%">
|
|
<figcaption>Fig. 4 - <b>Log4j</b> configuration file</figcaption>
|
|
<figcaption>Fig. 4 - <b>Log4j2</b> configuration file</figcaption>
|
|
</figure>
|
|
</figure>
|
|
</div>
|
|
</div>
|
|
|
|
|
... | @@ -67,4 +67,11 @@ We won't go into all the details about configuring log4j since this is extensive |
... | @@ -67,4 +67,11 @@ We won't go into all the details about configuring log4j since this is extensive |
|
</div>
|
|
</div>
|
|
|
|
|
|
For those of you who are familiar with the log4j logging framework, you'll immediately recognise that TULIP apparently defines a couple of custom logging **appenders** and **loggers**. In *log4j-speak*, a *logger* is a class in charge of filtering and formatting logging information. *Appenders* in turn represent the logging channel, i.e. the actual output being used to deliver logging information.
|
|
For those of you who are familiar with the log4j logging framework, you'll immediately recognise that TULIP apparently defines a couple of custom logging **appenders** and **loggers**. In *log4j-speak*, a *logger* is a class in charge of filtering and formatting logging information. *Appenders* in turn represent the logging channel, i.e. the actual output being used to deliver logging information.
|
|
|
|
#### OnScreenLog Appender
|
|
|
|
The **OnScreenLog** appender is responsible for displaying logging information in TULIP' splash-screen, shown while the application is starting up. Looking at the log4j2 configuration file, we see:
|
|
|
|
|
|
|
|
> \<OnScreenLog name="SplashScreen" size="1000"\>
|
|
|
|
> \<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/\>
|
|
|
|
> \</OnScreenLog\>
|
|
|
|
|
|
|
|
|