Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
20 views
asked in CompleteFTP by (200 points)
I am currently console logging info from my application and I would like to send it to a textfile.

var logFile = new File("/Docs/Logs/logFile.txt");

logFile.writeText("blahblahblah") and logFile.appendText("blahblahblah") gives me an exception: NotStreamableException.

1 Answer

0 votes
answered by (43.9k points)
I just tried this and it worked fine, although that was with version 12.  I don't have a version 11 installation handy right now.  Have you had a look at the logs to see if there are any clues as to why this is happening?  Does /Docs/Logs exist?
commented by (200 points)
Yes the folder and text file do exist in the right locations.
commented by (43.9k points)
I installed 11.0.6 and tried your code.  It worked fine again.  I ran the code in a process trigger that triggered on a successful login.  Where are you running it?  Is it in a process trigger, an extension or in a web-app?  Please be as specific as you can so that I have a better chance of replicating the problem.  If you'd like to include confidential information then you can open a help-desk ticket at enterprisedt.com/help.  I'll reply to you from there.

Categories

...