Table of Contents
1. Description
Write string into common Graphlytic log file. Useful to log information during execution of ETL job.
2. Connection
2.1. Attributes
There are no special attributes supported for this driver.
2.2. Parameters
Name | Description | Required | Default |
---|---|---|---|
level | level of log information. Possible values (all Slf4j levels): TRACE, DEBUG, INFO, WARN, ERROR. | no | DEBUG |
log_to_file | toggle writing logs into file. | true | |
log_to_history | toggle writing logs into job history entries. | true |
3. Query
Not used.
4. Script
Write string into log file with defined level.
5. Examples
ETL job writes current date and time into log file.
<!DOCTYPE etl SYSTEM "
https://scriptella.org/dtd/etl.dtd
">
<
etl
>
<
description
>Test log</
description
>
<
connection
id
=
"logInfo"
driver
=
"log"
>
level=WARN
</
connection
>
<
connection
id
=
"groovy"
driver
=
"script"
>language=groovy</
connection
>
<
script
connection-id
=
"groovy"
>
etl.globals['sysStart'] = new Date();
</
script
>
<
script
connection-id
=
"logInfo"
>
start: ${etl.globals['sysStart']}
</
script
>
</
etl
>
Example log connection writing only job history entries (no file output)
<!DOCTYPE etl SYSTEM "
https://scriptella.org/dtd/etl.dtd
">
<
etl
>
<
description
>Test log</
description
>
<
connection
id
=
"logHistory"
driver
=
"log"
>
level=WARN
log_to_file=false
</
connection
>
<
script
connection-id
=
"logHistory"
>
Hello Job History!
</
script
>
</
etl
>