There may be times where developers need to log a set of data that may be expensive to obtain (i.e. need to loop through and parse a bunch of text etc). They only want to run that block of code if logging will occur, rather than computing the data then going to log only to find out logging was off.
Suggested fix is create a ok_to_log function where p_level is a varchar2. Internally it will call ok_to_log(p_level number).
In documentation should stress how this is to be used (i.e. should not write a bunch of "if ok_to_log" then blocks. Only for costly areas.
There may be times where developers need to log a set of data that may be expensive to obtain (i.e. need to loop through and parse a bunch of text etc). They only want to run that block of code if logging will occur, rather than computing the data then going to log only to find out logging was off.
Suggested fix is create a ok_to_log function where p_level is a varchar2. Internally it will call ok_to_log(p_level number).
In documentation should stress how this is to be used (i.e. should not write a bunch of "if ok_to_log" then blocks. Only for costly areas.