lsc
lsc copied to clipboard
posthook don't log script errors
Currently, posthook don't log script errors (see https://lsc-project.org/documentation/latest/syncrules.html#hooks-lsc-tasks-task-propertiesbasedsyncoptions-hooks)
It could be nice to log script stderr (and maybe also stdout?)
We need to check if this has an impact on performances
I have a suggestion: have different levels for STDOUT and STDERR.
Seems easy to add an option in printHookOutput to set the logback level. I would choose DEBUG or INFO for STDOUR and ERROR for STDERR, instead of having WARN for both.
What do you think @davidcoutadeur ?
Why not, it does not seem too difficult indeed.
Note: until know, the script were not supposed to write things to stdout/stderr, we should update the documentation:
Hook scripts are not supposed to write anything to stdout or stderr. If so, LSC will display theses messages as log warnings.
Done in commit 40d80fe2
I have set level INFO for stdout and ERROR for stderr
I am updating the corresponding documentation right now.