File: lazlogger.xml

package info (click to toggle)
lazarus 2.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 214,460 kB
  • sloc: pascal: 1,862,622; xml: 265,709; cpp: 56,595; sh: 3,008; java: 609; makefile: 535; perl: 297; sql: 222; ansic: 137
file content (222 lines) | stat: -rw-r--r-- 9,901 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions>
  <package name="LazUtils">
    <module name="LazLogger">
      <element name="DbgOut">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does not append a new line.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
          <p>This is a forwarder to the log TLazLogger object. See there for details.</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="DebugLn">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does append a new line.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
          <p>This is a forwarder to the log TLazLogger object. See there for details.</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="DebugLnEnter">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does append a new line. Increases the current intend.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
          <p>This is a forwarder to the log TLazLogger object. See there for details.</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="DebugLnExit">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does append a new line. Increases the current intend.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
          <p>This is a forwarder to the log TLazLogger object. See there for details.</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="TLazLogger">
        <short>A log writer object</short>
        <descr>
          <p>Provides functionality to write messages to a log file. Allows filtering and changing indent level. 
</p>
          <p>Can parse options from command line for log filename and filter settings.
</p>
          <p>An application can subclass the logger to add it's own functionality
</p>
        </descr>
      </element>
      <element name="TLazLogger.LogName">
        <short>The name of the log file</short>
        <descr>This can be set by the application.

Alternatively it can be determined according to ParamForLogFileName and EnvironmentForLogFileName</descr>
      </element>
      <element name="TLazLogger.ParamForLogFileName">
        <short>Name of the command line option, that has the logfile's name</short>
        <descr>If LogName is empty and this is set, then the commandline will be checked for a param of the name specified. LogName  will be set, if found.

The default is --debug-log=
Note that the dashes and equal sign must be present.</descr>
      </element>
      <element name="TLazLogger.DbgOut">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does not append a new line.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="TLazLogger.DebugLn">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does append a new line.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="TLazLogger.DebugLnEnter">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does append a new line. Increases the current intend.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="TLazLogger.DebugLnExit">
        <short>Write message to log</short>
        <descr>
          <p>Writes the text to the log. Does append a new line. Increases the current intend.
</p>
          <p>The Argument can be:</p>
          <p>One or more string</p>
          <p>An open array of const: All values are converted to string and joined</p>
          <p>A single string and open array of const:  Will be passed to Format</p>
          <p>Any of the above with a PLazLoggerLogGroup as filter</p>
        </descr>
        <seealso>
          <link id="#LazUtils.lazlogger.DebugLogger">DebugLogger</link>
        </seealso>
      </element>
      <element name="TLazLoggerLogGroupList"/>
      <element name="TLazLogger.EnvironmentForLogFileName">
        <short>Name of the environment, that has the logfile's name</short>
        <descr>If LogName is empty and con not be found from ParamForLogFileName, then the environment variable specified will be checked.
 LogName  will be set, if found.

* will be replaced by param(0)

The default is: *_debuglog
</descr>
      </element>
      <element name="TLazLogger.UseStdOut">
        <short>Enable writing to STDOUT, if LogName is not set</short>
      </element>
      <element name="TLazLogger.CloseLogFileBetweenWrites">
        <short>Enable opening and closing the log for each write</short>
      </element>
      <element name="TLazLogger.OnDebugLn">
        <short>Event when writing a full line (Debugln, DebuglnEnter or DebuglnExit)</short>
        <descr>The event contains the text to be logged.
It also has a handled var param, that can be set to True to prevent default action (writing to log)</descr>
      </element>
      <element name="TLazLogger.OnDbgOut">
        <short>Event when writing without line end (DbgOut)</short>
        <descr>The event contains the text to be logged.
It also has a handled var param, that can be set to True to prevent default action (writing to log)</descr>
      </element>
      <element name="TLazLogger.NestLvlIndent">
        <short>Indent to be added for each DebuglnEnter</short>
        <descr>Default is 2</descr>
      </element>
      <element name="TLazLogger.MaxNestPrefixLen">
        <short>Maxmum indent for DebuglnEnter</short>
        <descr>If the indent reaches this value, it will not increase anymore. Instead each line is prefixed with the nest-level of DebuglnEnter

Default is 15</descr>
      </element>
      <element name="TLazLogger.RegisterLogGroup">
        <short>Register a named filter </short>
        <descr>var
   MyFilter: PLazLoggerLogGroup;

initialization
  MyFilter := DebugLogger.RegisterLogGroup('MyFilterName');

then write 
  debugln(MyFilter, ['Notice: ', SomeText]);


The filter can be enabled via the command line. See ParamForEnabledLogGroups</descr>
      </element>
      <element name="TLazLogger.ParamForEnabledLogGroups">
        <short>Name of the command line option, to enable or disable LogGroups</short>
      </element>
      <element name="TLazLogger.LogGroupList">
        <short>List of all LogGroups</short>
      </element>
      <short>Provides a log framework</short>
      <descr>LazLogger provides logging facilities to write message to a file. 
Messages can be logged plain, or enclosed in begin/end like blocks, adding indent to all messages between to points (blocks can be nested).
It also has the ability to filter groups of messages.

It can reads the command line and environment to find the desired filename. By default it looks for --debug-log= on the command line or "appname"_debuglog in environment.

If no log name is found StdOut is used.

The simples usage, is to use the unit and put "DebugLn"/ "DbgOut" / "DebugLnEnter"/ "DebugLnExit" in your code. This works without any further setup.</descr>
    </module>
  </package>
</fpdoc-descriptions>