0

I have included some DBMS_OUTPUT.PUT_LINE inside my PLSQL package procedure. I wanted print these output in weblogic application server logs. But it does not show my DBMS_OUTPUT in weblogic server log. Currently, I use Log4j for server logging. Is there any extra configuration needed for this ? Thanks

  • I'm not familiar with Weblogic or Oracle Fusion Middleware etc, but it is likely that it does not provide any means to call `dbms_output.enable()` before each called statement and `dbms_output.get_lines()` after, and loop through the retrieved values saving them to the log. You might be able to do that in Java. – William Robertson Sep 09 '22 at 10:12

1 Answers1

0

Did you SET SERVEROUTPUT ON? Without it, DBMS_OUTPUT.PUT_LINE won't display anything.

This is what you have:

SQL> begin
  2    dbms_output.put_line('Hello, this is me!');
  3  end;
  4  /

PL/SQL procedure successfully completed.

When output is enabled:

SQL> set serveroutput on
SQL> begin
  2    dbms_output.put_line('Hello, this is me!');
  3  end;
  4  /
Hello, this is me!

PL/SQL procedure successfully completed.

SQL>
Littlefoot
  • 131,892
  • 15
  • 35
  • 57
  • I'm not sure what "weblogic application server" is but it's possible that it doesn't support the same `set` syntax as SQL\*Plus and SQL Developer. – William Robertson Sep 09 '22 at 10:03