... | ... | @@ -68,7 +68,7 @@ We won't go into all the details about configuring log4j since this is extensive |
|
|
|
|
|
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 **`Appenders`** declaration section in the log4j2 configuration file, we see how the **OnScreenLog** is inserted into TULIP's logging setup:
|
|
|
The **`OnScreenLog`** appender is responsible for displaying logging information in TULIP' splash-screen, shown while the application is starting up. Looking at the **`Appenders`** declaration section in the log4j2 configuration file, we see how the **`OnScreenLog`**is inserted into TULIP's logging setup:
|
|
|
|
|
|
> \<**OnScreenLog** name="**SplashScreen**" size="1000"\>
|
|
|
>
|
... | ... | @@ -86,7 +86,7 @@ A bit further down, in the **`Loggers`** section of the configuration file, we s |
|
|
>\</Root\>
|
|
|
|
|
|
#### TangibleLog Appender
|
|
|
The TangibleLog appender, in conjunction with the **TangibleLogger** itself, handles logging of *tangible interactions* with the table. This logger logs when and where a tangible object was placed, moved or removed from the table and thus allows re-constructing interactions which took place.
|
|
|
The **`TangibleLog`** appender, in conjunction with the **TangibleLogger** itself, handles logging of *tangible interactions* with the table. This logger logs when and where a tangible object was placed, moved or removed from the table and thus allows re-constructing interactions which took place.
|
|
|
|
|
|
|
|
|
> 07:49:17.477 - {"widget" : { "time":1588916957477, "id":0, "event":"DRP", "pos": {"x":0.142, "y":0.1211, "a":0}}}
|
... | ... | @@ -98,10 +98,13 @@ The TangibleLog appender, in conjunction with the **TangibleLogger** itself, han |
|
|
This excerpt of an actual tangible log file shows the logging output of said appender. The logger uses the JSON format for its output format to simplify take-up of generated output by external tools. You see that each **event** includes a timestamp, i.e. when did the event take place, which object **Id** was involved, what kind of event was it, i.e. was the object dropped (**DRP**), translated (**TRA**) or rotated (**ROT**) and when did the interaction stop (**STP**). Last but not least, each event specifies the position and angle at which it took place.
|
|
|
|
|
|
#### MqttLog Appender
|
|
|
The MqttLog appender allows transmitting logging data in real-time to a MQTT broker. Even though not used in our Hello World application, we'd like to show to you how this appender can be incorporated in a logging configuration.
|
|
|
The **`MqttLog`** appender allows transmitting logging data in real-time to a MQTT broker. Even though not used in our Hello World application, we'd like to show to you how this appender can be incorporated in a logging configuration.
|
|
|
|
|
|
> \<MqttLog name="MqttTangibles" broker="tcp://10.92.1.205:1883" topic="/HDCE_Lab/logs/tangibles"\>
|
|
|
>
|
|
|
> \<PatternLayout pattern="%msg"/\>
|
|
|
>
|
|
|
> \</MqttLog\>
|
|
|
The **`MqttLog`** appender has a number of attributes for specifying the connection details of the MQTT broker to sent logging data to.
|
|
|
* `broker` : specifies the IP Address and port of the broker to connect to.
|
|
|
* `topic` : specifies the MQTT topic to send logging data to. |