Function sapnwrfc::binding::RfcSetTraceLevel
[−]
[src]
pub unsafe extern "C" fn RfcSetTraceLevel(
connection: RFC_CONNECTION_HANDLE,
destination: *mut SAP_UC,
traceLevel: c_uint,
errorInfo: *mut RFC_ERROR_INFO
) -> RFC_RC
Sets the current trace level of the specified RFC connection or destination to the new value.
Note: If both of connection and destination are NULL, this function sets the "global" trace level. See below. \in connection A handle to a currently open RFC connection (client or server connection). The new trace level will be effective immediately. \in *destination Null-terminated string specifying a client or server destination as defined via a DEST=... entry in sapnwrfc.ini. The new trace level will be used for new connections to that destination opened after the %RfcSetTraceLevel() call. Already existing connections to that destination will not be effected. \in traceLevel The new trace level. Must be between 0 and 3. The meaning of those four values is as follows: - 0: Off. Only severe errors are logged to the dev_rfc.trc file. - 1: Brief. All API calls (except for the setter and getter functions) and important attributes like codepages, RFC headers, logon parameters are traced. Trace is written to a file named rfc<pid>.trc or rfc<pid>_<tid>.trc, depending on whether tracing is done on a "per-process" basis or a "per-thread" basis. <pid> is the current process ID, <tid> the current thread ID. - 2: Verbose. In addition to 1, the values of the "scalar" RFC parameters as well as the contents of the network containers are traced. Scalar parameters are primitive types (CHAR, INT, FLOAT, etc) and flat structures. - 3: Full. In addition to 2 the contents of nested structures and tables as well as all API calls of setter and getter functions are traced. \out *errorInfo Detail information in case the specified connection or destination does not exist. \return RFC_OK, RFC_INVALID_HANDLE or RFC_INVALID_PARAMETER
Note: In general RFC trace can be activated/deactivated in 6 different ways: - By setting the parameter RFC_TRACE=[0|1|2|3] in the DEFAULT section of the sapnwrfc.ini file. This value applies to all destinations, for which no explicit trace level has been set. ("Global" trace level.) - By setting the parameter TRACE=[0|1|2|3] in a specific destination section of sapnwrfc.ini. it applies to that destination only and overrules the "global" trace level from the DEFAULT section. - By setting the environment variable RFC_TRACE=[0|1|2|3]. This overrules the setting from the DEFAULT section of sapnwrfc.ini. - Via %RfcSetTraceLevel(). If connection and destination are NULL, this function sets the global trace level and overrules the value from the DEFAULT section of sapnwrfc.ini as well as the environment variable RFC_TRACE. If connection is non-NULL, it sets the trace level for the current connection only, and if destination is non-NULL, it sets the trace level for that destination, overruling the value from this destination's section in the sapnwrfc.ini file. - By passing a {name=TRACE, value=[0|1|2|3]} pair in the RFC_CONNECTION_PARAMETER array used in RfcOpenConnection(), RfcRegisterServer() or RfcStartServer(). If that RFC_CONNECTION_PARAMETER array also contains a {name=DEST, value=...} pair, the trace parameter from the array overrules the value from this destination's sapnwrfc.ini section. - In case the program is a server program: by activating the trace flag for the corresponding destination in SM59. The trace setting on backend side is then "inherited" by the external side.
Note: For more information on trace settings see the sample sapnwrfc.ini file contained in the demo folder.