|
native void | org.endurox.AtmiCtx.tplogdelbufreqfile (TypedBuffer data) |
|
native int | org.endurox.AtmiCtx.tplogqinfo (int lev, long flags) |
|
native void | org.endurox.AtmiCtx.tplogex (int lev, String msg, Throwable e) |
|
native void | org.endurox.AtmiCtx.tplogsetreqfile (TypedBuffer data, String filename, String filesvc) |
|
native String | org.endurox.AtmiCtx.tploggetbufreqfile (TypedBuffer data) |
|
native String | org.endurox.AtmiCtx.tploggetreqfile () |
|
native void | org.endurox.AtmiCtx.tplogsetreqfile_direct (String filename) |
|
native void | org.endurox.AtmiCtx.tplogclosereqfile () |
|
native void | org.endurox.AtmiCtx.tplogconfig (int logger, int lev, String debug_string, String module, String new_file) |
|
native void | org.endurox.AtmiCtx.userlogex (String msg, Throwable e) |
|
void | org.endurox.AtmiCtx.tplog (int lev, boolean directCall, String format, Object... arguments) |
|
void | org.endurox.AtmiCtx.tplogAlways (String format, Object... arguments) |
|
void | org.endurox.AtmiCtx.tplogError (String format, Object... arguments) |
|
void | org.endurox.AtmiCtx.tplogWarn (String format, Object... arguments) |
|
void | org.endurox.AtmiCtx.tplogInfo (String format, Object... arguments) |
|
void | org.endurox.AtmiCtx.tplogDebug (String format, Object... arguments) |
|
native void | org.endurox.AtmiCtx.tplogDump (int lev, String msg, byte[] data) |
|
native void | org.endurox.AtmiCtx.tplogDumpDiff (int lev, String msg, byte[] data1, byte[] data2) |
|
List of text logging functions for log file processing.
◆ tplog()
void org.endurox.AtmiCtx.tplog |
( |
int |
lev, |
|
|
boolean |
directCall, |
|
|
String |
format, |
|
|
Object... |
arguments |
|
) |
| |
Write the user log
- Parameters
-
lev | Log level |
directCall | is this function called directly or via logger wrapper? |
format | format string |
arguments | format arguments |
◆ tplogAlways()
void org.endurox.AtmiCtx.tplogAlways |
( |
String |
format, |
|
|
Object... |
arguments |
|
) |
| |
Log Always
- Parameters
-
format | format string |
arguments | variable args |
◆ tplogclosereqfile()
native void org.endurox.AtmiCtx.tplogclosereqfile |
( |
| ) |
|
Close request file. The logger will return to thread logger (if was configured) or process logger.
See tplogclosereqfile(3) manpage for more information.
◆ tplogconfig()
native void org.endurox.AtmiCtx.tplogconfig |
( |
int |
logger, |
|
|
int |
lev, |
|
|
String |
debug_string, |
|
|
String |
module, |
|
|
String |
new_file |
|
) |
| |
Configure logger. Function does configure logging facilities - NDRX (XATMI internal logs), UBF (UBF internal logs( and TP (User logs). If not already logger started, then this method will initiate Enduro/X framework to load the logging settings from [@debug] ini section or from ndrxdebug.conf(5). Then with help of this method user is able to override loaded settings.
Also it is possible to set per thread logging, if facility code used here is LOG_FACILITY_TP_THREAD. Or it is possible to configure request based logging from thus method, but tplogsetreqfile_direct(3) and tplogsetreqfile(3) is recommended to use instead.
See tplogconfig(3) manpage for more information.
- Parameters
-
logger | see AtmiConst.LOG_FACILITY... constants, can be binary OR'd |
lev | log level, see AtmiConst.LOG_DUMP,..,AtmiConst.LOG_ALWAYS |
debug_string | debug string according to ndrxdebug.conf(5) |
module | module name which does the logging (is used in log file line, 4 symbols) |
new_file | New log file to use for logging |
- Exceptions
-
AtmiNEFORMATException | Invalid format for debug_string. |
AtmiNESYSTEMException | System error occurred. See the logs for more info. |
◆ tplogDebug()
void org.endurox.AtmiCtx.tplogDebug |
( |
String |
format, |
|
|
Object... |
arguments |
|
) |
| |
Log Debug
- Parameters
-
format | format string |
arguments | variable args |
◆ tplogdelbufreqfile()
native void org.endurox.AtmiCtx.tplogdelbufreqfile |
( |
TypedBuffer |
data | ) |
|
Delete request file name from buffer
- Parameters
-
- Exceptions
-
AtmiTPENOENTException | Filed not present or failed to remove from UBF. |
AtmiTPEINVALException | Not UBF buffer or buffer NULL. |
NullPointerException | data is NULL. |
◆ tplogDump()
native void org.endurox.AtmiCtx.tplogDump |
( |
int |
lev, |
|
|
String |
msg, |
|
|
byte[] |
data |
|
) |
| |
Write the hex dump to the log file
- Parameters
-
msg | Message to print in log |
data | bytes to dump off |
◆ tplogDumpDiff()
native void org.endurox.AtmiCtx.tplogDumpDiff |
( |
int |
lev, |
|
|
String |
msg, |
|
|
byte[] |
data1, |
|
|
byte[] |
data2 |
|
) |
| |
Print the differences between two binary buffers
- Parameters
-
lev | log level at which to print |
msg | hex dump message |
data1 | first byte block |
data2 | second byte block to compare |
◆ tplogError()
void org.endurox.AtmiCtx.tplogError |
( |
String |
format, |
|
|
Object... |
arguments |
|
) |
| |
Log Error
- Parameters
-
format | format string |
arguments | variable args |
◆ tplogex()
native void org.endurox.AtmiCtx.tplogex |
( |
int |
lev, |
|
|
String |
msg, |
|
|
Throwable |
e |
|
) |
| |
Log exception to user logger
- Parameters
-
lev | debug level |
msg | trace message |
e | exception to backtrace |
◆ tploggetbufreqfile()
native String org.endurox.AtmiCtx.tploggetbufreqfile |
( |
TypedBuffer |
data | ) |
|
Read the request file name from the given data
buffer. Currently only UBF buffer is supported and field name must be EX_NREQLOGFILE.
See tploggetbufreqfile(3) manpage for more information.
- Parameters
-
data | Typed buffer, UBF supported only. |
- Returns
- current logging file name.
- Exceptions
-
AtmiTPENOENTException | Request logging file name not present in UBF buffer or system failure in reading from UBF. |
AtmiTPEINVALException | Not UBF buffer. |
NullPointerException | data is NULL. |
◆ tploggetreqfile()
native String org.endurox.AtmiCtx.tploggetreqfile |
( |
| ) |
|
Get current request logging file. In case if request logging is not used, method returns null value.
See tploggetreqfile(3) manpage for more information.
- Returns
- current request logging file. In case if request logging is not used, null value is returned.
◆ tplogInfo()
void org.endurox.AtmiCtx.tplogInfo |
( |
String |
format, |
|
|
Object... |
arguments |
|
) |
| |
Log Info
- Parameters
-
format | format string |
arguments | variable args |
◆ tplogqinfo()
native int org.endurox.AtmiCtx.tplogqinfo |
( |
int |
lev, |
|
|
long |
flags |
|
) |
| |
Query logger information
- Parameters
-
lev | current log level |
flags | See TPLOGQI_GET_ and TPLOGQI_EVAL_ flag constants |
- Returns
- LOG_FACILITY_ bits, TPLOGQI_RET_ bits, and bits from 24..32 represents log level.
◆ tplogsetreqfile()
native void org.endurox.AtmiCtx.tplogsetreqfile |
( |
TypedBuffer |
data, |
|
|
String |
filename, |
|
|
String |
filesvc |
|
) |
| |
Set request log file name. This switches the current logger for tp, ndrx and ubf to specific file name. The logfile name can be present in typed buffer (i.e. UBF buffer field EX_NREQLOGFILE) - parameter \data, or file name can be specified in filename
argument if these parameters are not set or file name os not there, function will attempt to call filesvc
service (if present). In case of if function is unable to locate the filename, the exception is thrown.
If UBF buffer is passed and file name is only present in filename
, then function sill set field EX_NREQLOGFILE to UBF data
buffer.
See tplogsetreqfile(3) manpage for more information.
- Parameters
-
data | Typed Buffer (supports only UBF buffer currently) with EX_NREQLOGFILE field present. This buffer also is used for doing filesvc calls. In case if file name is available in filename and buffer data is present, the value is copied to EX_NREQLOGFILE. It is assumed that buffer has enough space to set the EX_NREQLOGFILE field. Parameter is optional and might be passed as null. |
filename | File name to which set the request logging. |
filesvc | fallback service name to request for log file name (EX_NREQLOGFILE) in case if data and filename does not contain the file name to switch logging to. |
- Exceptions
-
AtmiTPEINVALException | Missing file name in parameters (invalid parameter combination). |
AtmiTPENOENTException | No service (filesvc parameter) advertised in system. |
AtmiTPETIMEException | Service did not reply in given time (NDRX_TOUT). |
AtmiTPESVCFAILException | Service returned TPFAIL. This is application level failure. |
AtmiTPESVCERRException | System level service failure. Server died during the message presence in service queue. |
AtmiTPESYSTEMException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
AtmiTPEOSException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
◆ tplogsetreqfile_direct()
native void org.endurox.AtmiCtx.tplogsetreqfile_direct |
( |
String |
filename | ) |
|
Change logger file directly from the given file name. If there is problem with setting the output log file, the logger will be changed to stderr.
See tplogsetreqfile_direct(3) manpage for more information.
- Parameters
-
filename | file name to which set the request logger |
- Exceptions
-
NullPointerException | In case if filename is null. |
◆ tplogWarn()
void org.endurox.AtmiCtx.tplogWarn |
( |
String |
format, |
|
|
Object... |
arguments |
|
) |
| |
Log Warning
- Parameters
-
format | format string |
arguments | variable args |
◆ userlogex()
native void org.endurox.AtmiCtx.userlogex |
( |
String |
msg, |
|
|
Throwable |
e |
|
) |
| |
Log exception to ulog
- Parameters
-
msg | custom message |
e | exception to backtrace |