Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.err java log location in ColdFusion

I have some ColdFusion code which calls a function in a Java class via:

<cfset object = CreateObject("java","org.prog.jar.Class")>
<cfset object.Method()>

If an error is thrown in the Java class it writes the error to the Java error stream:

System.err.println(e.getMessage());

Can someone tell me what happens to this stream in ColdFusion and whether it is written to a file or is accessible in any other way?

Thanks,

Tom

like image 209
Loftx Avatar asked Mar 17 '26 12:03

Loftx


2 Answers

Default to C:\ColdFusion9\runtime\logs\ for single instance or C:\JRun4\logs for multi instance.

Check "Log Directory" in your CF Administrator.

I'm not sure, but I'd say it's either in application.log or exception.log or both.

like image 54
Henry Avatar answered Mar 19 '26 02:03

Henry


  • If the exception is being caught, it should not be logged to application.log or exception.log

  • Otherwise, for a single instance, try the default C:\ColdFusion9\runtime\logs\ directory for check the latest coldfusion-outX.log file (they rotate). Note: The location of the logs can vary.

Btw: You can always test it out from CF using:

<cfset System = createObject("java", "java.lang.System")>
<cfset System.err.println("where does this message end up?")>
like image 38
Leigh Avatar answered Mar 19 '26 00:03

Leigh