Back to home page

Enduro/X

 
 

    


0001 TPLOGQINFO(3)
0002 =============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tplogqinfo - Query log configuration information
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <ndebug.h>
0014 #include <nerror.h>
0015 
0016 long tplogqinfo(int lev, long flags);
0017 
0018 
0019 Link with '-lnstd -lpthread -lrt -lm'
0020 
0021 DESCRIPTION
0022 -----------
0023 Function is used to query information about current thread logging configuration.
0024 By default if 'lev' is passed and infos are queried for given loggers 
0025 (passed in 'flags'):
0026 
0027 -------------------------------------------------------------------------------
0028 
0029 #define TPLOGQI_GET_NDRX            0x00000001
0030 #define TPLOGQI_GET_UBF             0x00000002
0031 #define TPLOGQI_GET_TP              0x00000004
0032 
0033 -------------------------------------------------------------------------------
0034 
0035 and if 'lev' is higher, than currently configured, function will return *0*. If
0036 'lev' equals or is lower than currently configured log level, the informations
0037 are returned. Returned infos may be forced to be returned by *TPLOGQI_EVAL_RETURN*
0038 flag. The 'iflags' of the loggers can be evaluate, and currently supported operation
0039 is *TPLOGQI_EVAL_DETAILED* (in flags), if set, the test for *detailed* flag is
0040 made. If flag is present in *iflags* of logger config, then return value will
0041 contain then *TPLOGQI_RET_HAVDETAILED* bit.
0042 
0043 
0044 RETURN VALUE
0045 ------------
0046 On success, *tplogqinfo()* returns following infos in 32bit integer:
0047 first 0x0000ffff bits contains the actual logger facility currently in use for
0048 matched *TPLOGQI_GET* logger:
0049 
0050 -------------------------------------------------------------------------------
0051 
0052 #define LOG_FACILITY_NDRX           0x00000001
0053 #define LOG_FACILITY_UBF            0x00000002
0054 #define LOG_FACILITY_TP             0x00000004
0055 #define LOG_FACILITY_TP_THREAD      0x00000008
0056 #define LOG_FACILITY_TP_REQUEST     0x00000010
0057 #define LOG_FACILITY_NDRX_THREAD    0x00000020
0058 #define LOG_FACILITY_UBF_THREAD     0x00000040
0059 #define LOG_FACILITY_NDRX_REQUEST   0x00000080
0060 #define LOG_FACILITY_UBF_REQUEST    0x00000100
0061 
0062 -------------------------------------------------------------------------------
0063 
0064 If *detailed* flag is evaluated positive, then following bit is returned too
0065 in return value:
0066 
0067 -------------------------------------------------------------------------------
0068 
0069 #define TPLOGQI_RET_HAVDETAILED     0x00010000
0070 
0071 -------------------------------------------------------------------------------
0072 
0073 The current debug level for given logger is returned in oldest 8 bits of the
0074 return value, i.e. extracted in mask 0xff000000.
0075 
0076 On error, -1 is returned, with *Nerror* set to indicate the error.
0077 
0078 ERRORS
0079 ------
0080 Note that *Nstrerror()* returns generic error message plus custom message 
0081 with debug info from last function call.
0082 
0083 *NEINVAL* Invalid flags passed to function. None of *TPLOGQI_GET_NDRX*, 
0084 *TPLOGQI_GET_UBF* or *TPLOGQI_GET_TP* are present.
0085 
0086 EXAMPLE
0087 -------
0088 See *ubftest/test_nstd_debug.c* for sample code.
0089 
0090 BUGS
0091 ----
0092 Report bugs to support@mavimax.com
0093 
0094 SEE ALSO
0095 --------
0096 *tplogdump(3)* *tplogdumpdiff(3)* *tplog(3)* *tplogsetreqfile_direct(3)* 
0097 *tplogsetreqfile(3)* *ex_devguide(guides)* *ndrxdebug.conf(5)* *tplogconfig(3)*
0098 
0099 COPYING
0100 -------
0101 (C) Mavimax, Ltd
0102