[log4plsql] Change logging level for entire application?
Brought to you by:
gmoulard
From: <log...@li...> - 2004-11-28 21:55:16
|
Hi,=20 This is an excellent and extremely useful program for plsql development. Thank you for taking the time to write and maintain this program and thanks for making it open source. I have one question though: If I want to set the logging level for the entire application/database to e.g. info because I have to trace a bug on a production system I=B9d like to be able to do so without invalidating the plo= g and plogparam packages and hence all packages that make use of log4plsql. The only way to set the logging level for the entire database is to change the value of the DEFAULT_LEVEL constant in the plogparam package specification. (At least that is what I believe but as a beginner I might b= e wrong here ...).=20 If this really is the case I think it would be a good idea to define the constants in the package body as the recompilation of a body does not cause the other packages to be invalidated. I=B9d suggest to change the code similar to the following: Pslogparam.sql: replace constant DEFAULT_LEVEL with FUNCTION specification getApp_logginglevel (reason: prevent invalidation in case of recompilation) =20 Pblogparam.sql:=20 FUNCTION getApp_loggingLevel RETURN tlog.llevel%TYPE IS lv_app_logging_level tlog.llevel%TYPE; BEGIN lv_app_logging_level :=3D 70; -- all RETURN lv_app_logging_level; END getApp_loggingLevel; What do you think of this? Or is there some functionality already where I can achieve the same results without recompiling the package spec? Cheers,=20 Sandy=20 |