Safe every output to a 'Logfile' by default

madmin

Member
Hi,
is it possible to safe the output to a logfile additionally to the output displayed in the developer? To be clear, the output should still be shown in the developer.

If its possible to do so, can you explain me how to do it? Or can you refer help on other pages?

Thanks for your help.

Regards,

madmin
 
Last edited:
Maybe there is a way, but I don't know how to do it with pl/sql Developer alone. You could do something similar to what we do though.

Dbms_output is not turned on for our concurrent programs, so nothing shows up in the logs when run as a concurrent request if we use dbms_output.put_line. Fnd_file.put_line shows up in the logs when run as a concurrent program, but don't show up in PL/SQL Developer when I test.

My initial solution was to wrap both dbms_output and the log output with a procedure and call our procedure instead of dbms_output.put_line or fnd_file.put_line. Later, it was made more complex and switches depending on if the concurrent request is -1 or not, but the simple solution worked. We have it in a package with other stuff and this is the procedure to give you an idea:

PROCEDURE display_error_msg(i_text IN VARCHAR2) IS

BEGIN
DBMS_OUTPUT.PUT_LINE(i_text);
FND_FILE.PUT_LINE(FND_FILE.LOG, i_text);
END display_error_msg;
 
What kind of output? What do you mean "by default"?
If output from "Command Window" would suffice, then there's the "SPOOL" command that you can issue in that window, to make the application also put all the output in the file specified by that command.
You could use "AfterConnect.sql" or "Login.sql" PL/SQL Developer specific script files (in the application folder) or other auto-executed scripts (e.g. SQL*Plus "glogin.sql" and/or "login.sql") to execute that SPOOL command on all new windows.

This is not "by default" and that's good as I would not want my PL/SQL Developer logging everything I do.
 
Back
Top