Allow user programme to set RMR verbosity level
[ric-plt/lib/rmr.git] / doc / src / man / rmr_set_vlevel.3.xfm
1 .if false
2 ==================================================================================
3         Copyright (c) 2019-2020 Nokia 
4         Copyright (c) 2018-2020 AT&T Intellectual Property.
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17 ==================================================================================
18 .fi
19
20 .if false
21         Mnemonic        rmr_set_vlevel.3.xfm
22         Abstract        The manual page for the function which sets the verbosity level
23                                 in RMR logging.
24         Author          E. Scott Daniels
25         Date            28 January 2020
26 .fi
27
28 .gv e LIB lib
29 .im &{lib}/man/setup.im 
30
31 &line_len(6i)
32
33 &h1(RMR Library Functions)
34 &h2(NAME)
35         rmr_set_trace
36
37 &h2(SYNOPSIS)
38 &indent
39 &ex_start
40 #include <rmr/rmr.h>
41 #include <rmr/rmr_logging.h>
42
43 void rmr_set_vlevel( int new_level )
44 &ex_end
45
46 &uindent
47
48 &h2(DESCRIPTION)
49 The &cw(rmr_set_vlevel) allows the user programme to set the verbosity level 
50 which is used to determine the messages RMR writes to standard error.
51 The &cw(new_vlevel) value must be one of the following constants which have the 
52 indicated meanings:
53
54 &beg_dlist(1i : &bold_font )
55 &ditem(RMR_VL_OFF) 
56         Turns off all message writing. This includes the stats and debugging messages generated by the 
57         route collector thread which are normally affected only by the externally managed verbose
58         level file (and related environment variable). 
59 &half_space
60
61 &ditem(RMR_VL_CRIT) 
62         Write only messages of critical importance. 
63         From the point of view of RMR, when a critical proper behaviour of the library cannot be 
64         expected or guaranteed.
65
66 &ditem(RMR_VL_ERR) 
67         Include error messages in the output.
68         An error is an event from which RMR has no means to recover. 
69         Continued proper execution is likely except where the affected connection and/or component
70         mentioned in the error is concerned.
71
72 &ditem(RMR_VL_WARN) 
73         Include warning messages in the output.
74         A warning indicates an event which is not considered to be normal, but is expected and
75         continued acceptable behaviour of the system is assured.
76
77 &ditem(RMR_VL_INFO) 
78         Include informational messagees in the output.
79         Informational messages include some diagnostic information which explain the activities
80         of RMR.
81
82 &ditem(RMR_VL_DEBUG) 
83         Include all debugging messages in the output.
84         Debugging must have also been enabled during the build as a precaution to accidentally
85         enabling this level of output as it can grossly affect performance.
86 &end_dlist
87 &space
88
89 generally RMR does not write messages to the standard error device from &ital(critical path)
90 functions, therefore it is usually not harmful to enable a verbosity level of either RMR_VL_CRIT, or RMR_VL_ERR.
91
92 &space
93 Messages written from the route table collection thread are still governed by the value placed
94 into the verbose level control file (see the man page for rmr_init()); those messages are affected
95 only when logging is completely disabled by passing RMR_VL_OFF to this function. 
96
97 &space
98 The verbosity level can also be set via an environment variable prior to the start of the 
99 RMR based application.
100 The environment variable is read only during initialisation; if the programme must change
101 the value during execution, this function must be used.
102 The default value, if this function is never called, and the environment variable is not
103 present, is RMR_VL_ERR.
104
105 &h2(SEE ALSO )
106 .ju off
107 rmr_init(3)
108 .ju on