Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to force Scriptella console out to a log file too? #15

Open
hansgru opened this issue May 19, 2015 · 5 comments
Open

How to force Scriptella console out to a log file too? #15

hansgru opened this issue May 19, 2015 · 5 comments

Comments

@hansgru
Copy link

hansgru commented May 19, 2015

How to force everything what Scriptella is displaying to the console to a scriptella.log file too?
I couldn't find how to specify such a thing in the etl.xml :(.

Of course I don't mean only the the individual "log" tasks:

<connection id="script" driver="script"/>
<script connection-id="script">
    java.lang.System.out.println("something ...");
</script>

but everything that's displayed for later use.

Thank you.

@seansummers
Copy link
Contributor

I have not had any luck myself with getting java logging or commons-logging to work reasonably.

@aadrian
Copy link

aadrian commented May 30, 2015

I haven't found a solution for this either.

+1 for an automated and out of the box scriptella.log.

@ejboy
Copy link
Member

ejboy commented Aug 4, 2015

How about using tee command to redirect the output to file, e.g.:
scriptella | tee scriptella.log

@aadrian
Copy link

aadrian commented Aug 4, 2015

How about using tee command to redirect the output

When using it programmatically it's impossible to separate the output of Scriptella only to a file.

@ejboy
Copy link
Member

ejboy commented Sep 24, 2015

You can always programmatically redirect Scriptella logs to a custom handler by calling LoggingConfigurer.configure(...);

This way scriptella redirects JUL to ant logging for instance.

https://github.com/scriptella/scriptella-etl/blob/fe618fb15d67a0dc7c40f1075eebc1ac7d485bd6/core/src/java/scriptella/interactive/LoggingConfigurer.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants