1PMOPENLOG(3)               Library Functions Manual               PMOPENLOG(3)
2
3
4

NAME

6       __pmOpenLog - create a log file for diagnostics and debug output
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/impl.h>
11
12       FILE *__pmOpenLog(const char *progname, const char *logname,
13               FILE *oldstream, int *status);
14
15       cc ... -lpcp
16

DESCRIPTION

18       __pmOpenLog reassigns the standard I/O stream oldstream to be associat‐
19       ed  with  the  file logname.  If it already exists, logname will be re‐
20       moved and recreated if possible (to ensure correct ownership  and  per‐
21       missions from the caller to __pmOpenLog).
22
23       On  return,  the function value is the new standard I/O stream.  In the
24       event of an error, this will be oldstream unchanged and status will  be
25       0.
26
27       For success, status is 1, a standard preamble is written to logname
28            Log for progname on hostname started date and time
29       and  an  atexit(3) handler is installed to write the postscript message
30       to logname
31            Log finished date and time
32       when the processes exits.
33
34       progname is only used to annotate messages.
35

SEE ALSO

37       atexit(3) and freopen(3).
38
39
40
41Performance Co-Pilot                  PCP                         PMOPENLOG(3)
Impressum