endurox-java
Functions
functions

Functions

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)
 

Detailed Description

List of text logging functions for log file processing.

Function Documentation

◆ tplog()

void org.endurox.AtmiCtx.tplog ( int  lev,
boolean  directCall,
String  format,
Object...  arguments 
)

Write the user log

Parameters
levLog level
directCallis this function called directly or via logger wrapper?
formatformat string
argumentsformat arguments

◆ tplogAlways()

void org.endurox.AtmiCtx.tplogAlways ( String  format,
Object...  arguments 
)

Log Always

Parameters
formatformat string
argumentsvariable 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
loggersee AtmiConst.LOG_FACILITY... constants, can be binary OR'd
levlog level, see AtmiConst.LOG_DUMP,..,AtmiConst.LOG_ALWAYS
debug_stringdebug string according to ndrxdebug.conf(5)
modulemodule name which does the logging (is used in log file line, 4 symbols)
new_fileNew log file to use for logging
Exceptions
AtmiNEFORMATExceptionInvalid format for debug_string.
AtmiNESYSTEMExceptionSystem error occurred. See the logs for more info.

◆ tplogDebug()

void org.endurox.AtmiCtx.tplogDebug ( String  format,
Object...  arguments 
)

Log Debug

Parameters
formatformat string
argumentsvariable args

◆ tplogdelbufreqfile()

native void org.endurox.AtmiCtx.tplogdelbufreqfile ( TypedBuffer  data)

Delete request file name from buffer

Parameters
datatyped buffer
Exceptions
AtmiTPENOENTExceptionFiled not present or failed to remove from UBF.
AtmiTPEINVALExceptionNot UBF buffer or buffer NULL.
NullPointerExceptiondata is NULL.

◆ tplogDump()

native void org.endurox.AtmiCtx.tplogDump ( int  lev,
String  msg,
byte[]  data 
)

Write the hex dump to the log file

Parameters
msgMessage to print in log
databytes 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
levlog level at which to print
msghex dump message
data1first byte block
data2second byte block to compare

◆ tplogError()

void org.endurox.AtmiCtx.tplogError ( String  format,
Object...  arguments 
)

Log Error

Parameters
formatformat string
argumentsvariable args

◆ tplogex()

native void org.endurox.AtmiCtx.tplogex ( int  lev,
String  msg,
Throwable  e 
)

Log exception to user logger

Parameters
levdebug level
msgtrace message
eexception 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
dataTyped buffer, UBF supported only.
Returns
current logging file name.
Exceptions
AtmiTPENOENTExceptionRequest logging file name not present in UBF buffer or system failure in reading from UBF.
AtmiTPEINVALExceptionNot UBF buffer.
NullPointerExceptiondata 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
formatformat string
argumentsvariable args

◆ tplogqinfo()

native int org.endurox.AtmiCtx.tplogqinfo ( int  lev,
long  flags 
)

Query logger information

Parameters
levcurrent log level
flagsSee 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
dataTyped 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.
filenameFile name to which set the request logging.
filesvcfallback 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
AtmiTPEINVALExceptionMissing file name in parameters (invalid parameter combination).
AtmiTPENOENTExceptionNo service (filesvc parameter) advertised in system.
AtmiTPETIMEExceptionService did not reply in given time (NDRX_TOUT).
AtmiTPESVCFAILExceptionService returned TPFAIL. This is application level failure.
AtmiTPESVCERRExceptionSystem level service failure. Server died during the message presence in service queue.
AtmiTPESYSTEMExceptionSystem failure occurred during serving. See logs i.e. user log, or debugs for more info.
AtmiTPEOSExceptionSystem 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
filenamefile name to which set the request logger
Exceptions
NullPointerExceptionIn case if filename is null.

◆ tplogWarn()

void org.endurox.AtmiCtx.tplogWarn ( String  format,
Object...  arguments 
)

Log Warning

Parameters
formatformat string
argumentsvariable args

◆ userlogex()

native void org.endurox.AtmiCtx.userlogex ( String  msg,
Throwable  e 
)

Log exception to ulog

Parameters
msgcustom message
eexception to backtrace