Commons component plugin - Macros - Logs¶
Contents :
# DEBUG $(message)¶
What ?
This macro allows to write a message in the console with the DEBUG status.
Underlying instruction :
EXECUTE log WITH $({message}) USING $(logLevel:DEBUG) AS whatever
> Input :
message
: The message to display.
Example :
# DEBUG $(This is a debug message logged with a macro) SKF Script :
To be able to see the message in the console, you need to activate maven debug output.
Console output :
# ERROR $(message)¶
What ?
This macro allows to write a message in the console with the ERROR status.
Underlying instruction :
EXECUTE log WITH $({message}) USING $(logLevel:ERROR) AS whatever
> Input :
message
: The message to display.
Example :
# ERROR $(This is an error message logged with a macro) SKF Script :
Console output :
# INFO $(message)¶
What ?
This macro allows to write a message in the console with the INFO status.
Underlying instruction :
EXECUTE log WITH $({message}) USING $(logLevel:INFO) AS whatever
> Input :
message
: The message to display.
Example :
# INFO $(This is an info message logged with a macro) SKF Script :
Console output :
# WARN $(message)¶
What ?
This macro allows to write a message in the console with the WARN status.
Underlying instruction :
EXECUTE log WITH $({message}) USING $(logLevel:WARN) AS whatever
> Input :
message
: The message to display.
Example :
# WARN $(This is a warn message logged with a macro) SKF Script :
Console output :
# LOG FILE CONTENT FROM {file} WITH LEVEL {level}¶
What ?
This macro allows to write the content of a file in the console with the status of your choice (DEBUG,INFO,WARN,ERROR).
Underlying instruction :
LOAD {file} AS __target{%%r1}
EXECUTE log WITH __target{%%r1} USING $(logLevel:{level},multiline:yes) AS $()
> Input :
file
: The file which you want to display the content.
Example :
# LOG FILE CONTENT FROM folder/example.txt WITH LEVEL INFO File to log :
SKF Script :
Console output :
# LOG FILE CONTENT FROM {content1} , {otherContent} WITH LEVEL {level}¶
What ?
This macro allows to write the content of multiple files in the console with the status of your choice (DEBUG,INFO,WARN,ERROR).
Underlying instruction :
# LOG FILE CONTENT FROM {content1} WITH LEVEL {level}
# LOG FILE CONTENT FROM {otherContent} WITH LEVEL {level}
> Input :
content1
: The selected file which you want to display the content.otherContent
: Another file which you want to display the content.
Example :
# LOG FILE CONTENT FROM folder/example.txt , folder/example2.txt WITH LEVEL WARN First file to log :
Second file to log :
Resource folder where files to log are stored :
SKF Script :
Console output :