How can Scriptella generate a log file?

I want Scriptella to generate a log file for each raw file to be ETLed just a log4j does for a java application. How to make this possible?


Any logging API can be called directly from the ETL file. Probably the easiest way to achieve that would be to use a script driver with a built-in Rhino support(JavaScript):

    <connection id="log4j" driver="script"/>

    <connection id="jul" driver="script"/>

    <script connection-id="jul">
        java.util.logging.Logger.getLogger("testLogger").info("This is JUL message");

    <script connection-id="log4j">
        //For demo purposes!!!
        //Configures log4j to use console for output
        //Normally log4j should be configured by using a config file

    <script connection-id="log4j">
        org.apache.log4j.Logger.getLogger("testLoggerName").info("This is LOG4J message");

You can declare a connection like this

<connection id="log" driver="text" url="D:/tmp/out.log"/>

and then use it in your query like this

<query connection-id="dbConnectionIn">
    select * from table
    <script connection-id="log">
        Result  $column1, $comun2 

This will now log it to the file under D:/tmp

Need Your Help

Steps to secure an input that has to be written in a database?

php security xss sql-injection

Lets say I have Text that is a POST textarea. In that field I should be able to put whatever I'd like to write. Such as XSS, SQL, and other eventual bad codes. For the markup I'll use the BBCode, s...

Eclipse RCP Plugin application crashes / freezes in windows 7

java windows-7 eclipse-plugin swt

Eclipse RCP plugin application which has a mix of SWT and swing/awt windows getting crashed randomly in Windows 7 64 bit. Especially when i open SWING/awt dialogs. I cant able to debug even when i ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.