PLSQLLOG Samples

If you first call a PLSQLLOG preocedure or function the current configuration is loaded into your session. Further changes to the configuration are not seen by the session until you re-read the configuration. 

If your configuration does not change during runtime you can simple use logging.
begin
  ...
  PLSQLLOG.LOGGER.log_debug('A simple log message.');
  ...
end;
/

If you have create a dedicated log source you should set this log source in your session before logging.
begin
  ...
  PLSQLLOG.LOGGER.set_log_source('TestLogSource');
  PLSQLLOG.LOGGER.log_info('A simple log message.');
  ...
end;
/

If you think it's useful to change the log source you can set the log source again.
begin
  ...
  PLSQLLOG.LOGGER.set_log_source('TestLogSource');
  PLSQLLOG.LOGGER.log_info('A simple log message.');
  ...
  ...
  PLSQLLOG.LOGGER.set_log_source('OtherTestLogSource');
  PLSQLLOG.LOGGER.log_error('A simple log message.');
  ...
end;
/

If you modify the configuration and an existing session using PLSQLLOG should see those changes you have to re-read the configuration.
begin
  ...
  PLSQLLOG.LOGGER.log_info('A simple log message.');
  ...
  ...
  PLSQLLOG.LOGGER.read_configuration;
  PLSQLLOG.LOGGER.log_error('A simple log message.');
  ...
end;
/

Please note If you call PLSQLLOG.LOGGER.read_configuration the configuration table is selected.

Last modified by Administrator on 2010/07/28 18:07
GDBUtil
A Java based generic database utility with configurable content. Database browsing, charts, console, etc. Visit...
ERMT
An entity relationship modelling tool. Visit...

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 2.0.2.24645 - Documentation