Script help

Hello All,
There is log file writting during execution of SnapLogic pipeline, as we dont have direct access
so wanted to browse below directory from script snap.

Can anyone help me here.

Below is the javascript used for writ the logs:-

try { load(“nashorn:mozilla_compat.js”); } catch (e) { }

var impl = {

input: input,
output: output,
error: error,
log: log,

execute: function () {
    while (this.input.hasNext()) {
        var doc =;
        this.output.write(doc, doc.response);

        var lastSystemTime = doc.lastSystemTime;

        var wrapper = new java.util.HashMap();
        var externalSystem = wrapper.externalSystem;

        if ((externalSystem != null) && (externalSystem.length > 0)) {
            if (! externalSystem[externalSystem.length - 1].endTime) {
                externalSystem[externalSystem.length - 1].endTime = lastSystemTime;

        wrapper.put("success", false);

        try {
            var om = new ObjectMapper();
            om.writeValue(new"/tmp/API_LOG/" + doc.executionId), wrapper);
        } catch (e) {}


var hook = new com.snaplogic.scripting.language.ScriptHook(impl);

Can any onne help me here to read above directory or files ??

Thanks in advanced.

@subhash.a.chandra I believe your question is you wish to browse the /tmp/API_LOG/ directory which contains the log files you are writing via the Script Snap, is that correct?

The Binary Snap Pack has a Directory Browser and File Reader Snaps that can work with the local filesystem e.g. file:///tmp/API_LOG/ - is that something you have tried?

Thanks robin for your suggetion.

I have tried that I was able to access files.
But still I wanted to access from script if something you have that will be good.