This repository has been archived by the owner on Aug 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
api trace
Ayhan Rashidov edited this page Sep 27, 2021
·
7 revisions
Represents the trace namespace with its methods.
- SAP Help
https://help.sap.com/doc/3de842783af24336b6305a3c0223a369/2.0.03/en-US/$.trace.html
- Module
- Sample usage:
let trace = $.trace;
let response = require('http/v4/response');
// Check trace methods availability in the "Preview" tab
response.println("Debug logging enabled: " +trace.isDebugEnabled());
response.println("Error logging enabled: " +trace.isErrorEnabled());
response.println("Fatal logging enabled: " +trace.isFatalEnabled());
response.println("Info logging enabled: " +trace.isInfoEnabled());
response.println("Warning logging enabled: " +trace.isWarningEnabled());
// If the trace method is enabled, it will print the message in the "Console" tab
trace.debug("Debug message!");
trace.error("Error message!");
trace.error("Fatal message!");
trace.info("Info message!");
trace.warning("Warning message!");
- Environment variables
Name | Description | Default value |
---|---|---|
XSK_LOG_DEBUG_ENABLED | Enables debug level logging. | true |
XSK_LOG_ERROR_ENABLED | Enables error level logging. | true |
XSK_LOG_FATAL_ENABLED | Enables fatal level logging. | true |
XSK_LOG_INFO_ENABLED | Enables log level logging. | true |
XSK_LOG_WARNING_ENABLED | Enables warning level logging. | true |
- Coverage
Methods | Description | Status |
---|---|---|
debug(message) | Writes the given message with the trace-level debug to the application trace file. | ✅ |
error(message) | Writes the given message with the trace-level error to the application trace file. | ✅ |
fatal(message) | Writes the given message with the trace-level fatal to the application trace file. | ✅ |
info(message) | Writes the given message with the trace-level info to the application trace file. | ✅ |
warning(message) | Writes the given message with the trace-level warning to the application trace file. | ✅ |
isDebugEnabled() | Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level debug. | ✅ |
isErrorEnabled() | Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level error. | ✅ |
isFatalEnabled() | Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level fatal. | ✅ |
isInfoEnabled() | Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level info. | ✅ |
isWarningEnabled() | Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level warning. | ✅ |
- Issues
- Unit Tests
- Integration Tests ❌
✅ - Feature implemented and working as supposed.
❌ - Feature not implemented yet.