-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to do an apex.debug call automatically when calling logger.log #217
Comments
@dgielis How do you think I should handle the following situation:
Should calls to
|
apex_debug, by default, does not store a log message if the page is not rendered in debug mode, or if the p_level is greater than the selected apex debug messaging level (there is an optional "force" parameter that can override this but you would not use it). https://docs.oracle.com/database/apex-5.1/AEAPI/MESSAGE-Procedure.htm#AEAPI29228 Suggested mapping:
|
Is this not a duplicate of #158? |
like the mapping of Jeff. Also note that in APEX you can do apex_debug.message('hello %s','Martin'); |
This seems out of scope for Logger and tightly couples Logger to Apex (though I imaging conditional compilation would fix that). I would suggest a better solution would be to wrap logger and apex.debug calls in a custom procedure. I added a Logger call to our custom error logging procedure when we started using it. |
Here is how I think, it could work. The subprogram that is called (log_error vs. log_trace) decides the logging level. Yes there will be a negative performance impact because for the additional subprogram call and the check for the apex log level. The apex_debug calls of cause are rendered there using conditional compiling. So this negative performance effect would only exist in an apex environment. In most APEX applications this slight performance slowdown would be acceptable. Other environments where performance is extremely critical will not need to configure this apex_debug setting. However it also means we can not easily configure this on an application level, unless we have a separate logger installation for each (apex) application. |
Clients would like to see their logs logged in APEX at the same time. This is redundant but helps when looking at the session debug in APEX.
Thanks to @dgielis for suggestion
The text was updated successfully, but these errors were encountered: