ETL: Log
Description
Write string into common Graphlytic log file. Useful to log information during execution of ETL job.
Connection
Parameters
Name |
Description |
Required |
Default |
level |
level of log information. Possible values (all Slf4j levels): TRACE, DEBUG, INFO, WARN, ERROR. |
no |
DEBUG |
Query
Not used.
Script
Write string into log file with defined level.
Examples
ETL job writes current date and time into log file.
<!DOCTYPE etl SYSTEM "
http://scriptella.javaforge.com/dtd/etl.dtd
">
<
etl
>
<
description
>Test log</
description
>
<
connection
id
=
"logInfo"
driver
=
"log"
>
level=INFO
</
connection
>
<
connection
id
=
"groovy"
driver
=
"script"
>language=groovy</
connection
>
<
script
connection-id
=
"groovy"
>
etl.globals['sysStart'] = new Date().format("yyyy-MM-dd'T'HH:mm:ss")
</
script
>
<
script
connection-id
=
"logInfo"
>
start: ${etl.globals['sysStart']}
</
script
>
</
etl
>