Skip to content

Commit 871e3a3

Browse files
committed
Finished off works on logging API
1 parent 546fbc6 commit 871e3a3

File tree

6 files changed

+120
-3
lines changed

6 files changed

+120
-3
lines changed

doc/api/xatmi/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ set(MAN3_NAMES
9898
tplogsetreqfile_direct
9999
tplogsetreqfile
100100
tploggetbufreqfile
101+
tplogdelbufreqfile
102+
tplogprintubf
101103
)
102104
set(PDF_MAN_NAMES ${MAN3_NAMES})
103105

doc/api/xatmi/tplog.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Report bugs to madars.vitolins@gmail.com
8080

8181
SEE ALSO
8282
--------
83-
*tplogdump(3)* *tplogdumpdiff(3)* *tplog(3)* *tplogconfig(3)* *tplogsetreqfile_direct(3)* *tplogsetreqfile(3)* *ex_devguide(guides)*
83+
*tplogdump(3)* *tplogdumpdiff(3)* *tplogprintubf(3)* *tplogconfig(3)* *tplogsetreqfile_direct(3)* *tplogsetreqfile(3)* *ex_devguide(guides)*
8484

8585
COPYING
8686
-------
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
TPLOGDELBUFREQFILE(3)
2+
=====================
3+
:doctype: manpage
4+
5+
6+
NAME
7+
----
8+
tplogdelbufreqfile - Delete request file from UBF buffer
9+
10+
SYNOPSIS
11+
--------
12+
#include <atmi.h>
13+
14+
int tplogdelbufreqfile(char *'data');
15+
16+
For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
17+
18+
For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
19+
20+
DESCRIPTION
21+
-----------
22+
Remove request logging file name from UBF buffer. This basically removes *EX_NREQLOGFILE* field from buffer, if present.
23+
24+
25+
RETURN VALUE
26+
------------
27+
On success, *tplogdelbufreqfile()* return zero; on error, -1 is returned, with *tperrno* set to indicate the error.
28+
29+
ERRORS
30+
------
31+
Note that *tpstrerror()* returns generic error message plus custom message with debug info from last function call.
32+
33+
*TPENOENT* Filed not present or failed to remove from UBF.
34+
35+
*TPEINVAL* Not UBF buffer or buffer NULL.
36+
37+
38+
EXAMPLE
39+
-------
40+
See *atmitest/test031_logging/atmiclt31.c* for sample code.
41+
42+
BUGS
43+
----
44+
Report bugs to madars.vitolins@gmail.com
45+
46+
SEE ALSO
47+
--------
48+
*tplogsetreqfile(3)* *tplogsetreqfile_direct(3)* *tplogconfig(3)* *tplogdump(3)* *tplogdumpdiff(3)* *tplog(3)* *ex_devguide(guides)* *ndrxdebug.conf(5)*
49+
50+
COPYING
51+
-------
52+
(C) ATR Baltic, SIA
53+

doc/api/xatmi/tplogdump.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Report bugs to madars.vitolins@gmail.com
9292

9393
SEE ALSO
9494
--------
95-
*tplogdumpdiff(3)* *tplog(3)* *tplogconfig(3)* *tplogsetreqfile_direct(3)* *tplogsetreqfile(3)* *ex_devguide(guides)*
95+
*tplogdumpdiff(3)* *tplog(3)* *tplogprintubf(3)* *tplogconfig(3)* *tplogsetreqfile_direct(3)* *tplogsetreqfile(3)* *ex_devguide(guides)*
9696

9797
COPYING
9898
-------

doc/api/xatmi/tplogdumpdiff.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Report bugs to madars.vitolins@gmail.com
100100

101101
SEE ALSO
102102
--------
103-
*tplogdump(3)* *tplog(3)* *tplogconfig(3)* *tplogsetreqfile_direct(3)* *tplogsetreqfile(3)* *ex_devguide(guides)*
103+
*tplogdump(3)* *tplog(3)* *tplogprintubf(3)* *tplogconfig(3)* *tplogsetreqfile_direct(3)* *tplogsetreqfile(3)* *ex_devguide(guides)*
104104

105105
COPYING
106106
-------

doc/api/xatmi/tplogprintubf.adoc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
TPLOGPRINTUBF(3)
2+
================
3+
:doctype: manpage
4+
5+
NAME
6+
----
7+
tplogprintubf - Print the UBF buffer to current logger
8+
9+
SYNOPSIS
10+
--------
11+
#include <atmi.h>
12+
13+
void tplogprintubf(int 'lev', char *'title', UBFH *'p_ub');
14+
15+
For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
16+
17+
For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
18+
19+
DESCRIPTION
20+
-----------
21+
Function dumps the UBF bufer conenet in field/value format to current logger. The 'lev' is debug level from which to perform logging. 'title' is title of the dump, 'p_ub' is pointer to UBF buffer. The output basically is the same as from *Bfprint()* UBF API function.
22+
23+
RETURN VALUE
24+
------------
25+
N/A
26+
27+
ERRORS
28+
------
29+
N/A
30+
31+
EXAMPLE
32+
-------
33+
See *atmitest/test031_logging/atmiclt31.c* for sample code.
34+
35+
For following code:
36+
37+
--------------------------------------------------------------------------------
38+
tplogprintubf(log_info, "Buffer before cleanup", p_ub);
39+
--------------------------------------------------------------------------------
40+
41+
The debug output looks like:
42+
43+
--------------------------------------------------------------------------------
44+
R:NDRX:4:24112:000:20160925:215908430:_tplog.c:0099:Buffer before cleanup
45+
EX_NREQLOGFILE ./logs/request_3.log
46+
T_STRING_FLD HELLO WORLD!
47+
T_CHAR_FLD A
48+
T_LONG_FLD 1000
49+
--------------------------------------------------------------------------------
50+
51+
BUGS
52+
----
53+
Report bugs to madars.vitolins@gmail.com
54+
55+
SEE ALSO
56+
--------
57+
*tplogsetreqfile(3)* *tplogsetreqfile_direct(3)* *tplogconfig(3)* *tplogdump(3)* *tplogdumpdiff(3)* *tplog(3)* *ex_devguide(guides)* *ndrxdebug.conf(5)*
58+
59+
COPYING
60+
-------
61+
(C) ATR Baltic, SIA
62+

0 commit comments

Comments
 (0)