source: rtems/doc/new_chapters/eventlog.t @ ebc67925

4.104.114.84.95
Last change on this file since ebc67925 was ebc67925, checked in by Wade A Smith <warm38@…>, on 08/10/98 at 14:53:01

Documented the following Event Logging routines:
log_write, log_open, log_read, log_notify, log_close, log_seek,
log_severity_before, log_facilityemptyset, log_facilityfillset,
log_facilityaddset, log_facilitydelset, and log_facilityismember

  • Property mode set to 100644
File size: 9.4 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1998.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@chapter Event Logging Manager
10
11@section Introduction
12
13The
14event logging manager is ...
15
16The directives provided by the event logging manager are:
17
18@itemize @bullet
19@item @code{log_write} - Write to the Log
20@item @code{log_open} - Open a log file
21@item @code{log_read} - Read from the system Log
22@item @code{log_notify} - Notify Process of writes to the system log
23@item @code{log_close} - Close log descriptor
24@item @code{log_seek} - Reposition log file offset
25@item @code{log_severity_before} - Compare event record severities
26@item @code{log_facilityemptyset} - Manipulate log facility sets
27@item @code{log_facilityfillset} - Manipulate log facility sets
28@item @code{log_facilityaddset} - Manipulate log facility sets
29@item @code{log_facilitydelset} - Manipulate log facility sets
30@item @code{log_facilityismember} - Manipulate log facility sets
31@end itemize
32
33@section Background
34
35@section Operations
36
37@section Directives
38
39This section details the event logging manager's directives.
40A subsection is dedicated to each of this manager's directives
41and describes the calling sequence, related constants, usage,
42and status codes.
43
44@page
45@subsection log_write - Write to the Log
46
47@subheading CALLING SEQUENCE:
48
49@ifset is-C
50@example
51int log_write(
52  const log_facility_t  facility,
53  const int             event_id,
54  const log_severity_t  severity,
55  const void           *buf,
56  const size_t          len
57);
58@end example
59@end ifset
60
61@ifset is-Ada
62@end ifset
63
64@subheading STATUS CODES:
65
66@table @b
67@item EINVAL
68The facility argument is not a valid log_facility.
69@item EINVAL
70The severity argument exceeds {LOG_SEVERITY_MAX}
71@item EINVAL
72The len argument exceeds {LOG_ENTRY_MAXLEN}
73@item ENOSPC
74The log file has run out of space on the device.
75@item ENOSYS
76The function log_write() is not supported by this implementation.
77@item EPERM
78The caller does not have appropriate permission for writing to
79the given facility.
80@item EIO
81An I/O error occurred in writing to the system event log.
82
83@end table
84
85@subheading DESCRIPTION:
86
87The @code{log_write} function writes an event record, consisting
88of event attributes, and the data identified by the @code{buf}
89argument, to the system log.
90
91@subheading NOTES:
92
93@page
94@subsection log_open - Open a log file
95
96@subheading CALLING SEQUENCE:
97
98@ifset is-C
99@example
100int log_open(
101  const logd_t         *logdes,
102  const char           *path,
103  const log_query_t    *query
104);
105@end example
106@end ifset
107
108@ifset is-Ada
109@end ifset
110
111@subheading STATUS CODES:
112
113@table @b
114@item EACCES
115Search permission is denied on a component of the path prefix,
116or the log file exists and read permission is denied.
117@item  EINTR
118A signal interrupted the call to log_open().
119@item EINVAL
120The log_facility field of the query argument is not a valid
121facility set.
122@item EINVAL
123The log_severity field of the query argument exceeds
124{LOG_SEVERITY_MAX}.
125@item EINVAL
126The path argument referred to a file that was not a log file.
127@item EMFILE
128Too many log file descriptors are currently in use by this
129process.
130@item ENAMETOOLONG
131The length of the path string exceeds {PATH_MAX}, or a pathname
132component is longer than {NAME_MAX} while {_POSIX_NO_TRUNC} is
133in effect.
134@item ENFILE
135Too many files are currently open in the system.
136@item ENOENT
137The file specified by the path argument does not exist.
138@item ENOTDIR
139A component of the path prefix is not a directory.
140@item ENOSYS
141The function log_open() is not supported by this implementation.
142
143@end table
144
145@subheading DESCRIPTION:
146
147The @code{log_open} function establishes the connection between a
148log file and a log file descriptor.
149
150@subheading NOTES:
151
152@page
153@subsection log_read - Read from the system Log
154
155@subheading CALLING SEQUENCE:
156
157@ifset is-C
158@example
159int log_read(
160  const logd_t logdes,
161  struct log_entry *entry,
162  void             *log_buf,
163  const size_t      log_len,
164  const size_t     *log_sizeread
165);
166@end example
167@end ifset
168
169@ifset is-Ada
170@end ifset
171
172@subheading STATUS CODES:
173
174@table @b
175@item EBADF
176The logdes argument is not a valid log file descriptor.
177@item EBUSY
178No data available.  The open log file descriptor references
179the current system log.  and there are no unread event records
180remaining.
181@item EINTR
182A signal interrupted the call to log_read().
183@item ENOSYS
184The function log_read() is not supported by this implementation.
185@item EIO
186An I/O error occurred in reading from the event log.
187
188@end table
189
190@subheading DESCRIPTION:
191
192
193@subheading NOTES:
194
195@page
196@subsection log_notify - Notify Process of writes to the system log.
197
198@subheading CALLING SEQUENCE:
199
200@ifset is-C
201@example
202int log_notify(
203  const logd_t           logdes,
204  const struct sigevent *notification
205);
206@end example
207@end ifset
208
209@ifset is-Ada
210@end ifset
211
212@subheading STATUS CODES:
213
214@table @b
215@item EBADF
216The logdes arfument is not a valid log file descriptor.
217@item EINVAL
218The notification argument specifies an invalid signal.
219@item EINVAL
220The process has requested a notify on a log that will not be
221written to.
222@item ENOSY
223The function log_notify() is not supported by this implementation.
224
225@end table
226
227@subheading DESCRIPTION:
228
229@subheading NOTES:
230
231@page
232@subsection log_close - Close log descriptor
233
234@subheading CALLING SEQUENCE:
235
236@ifset is-C
237@example
238int log_close(
239  const logd_t   logdes
240);
241@end example
242@end ifset
243
244@ifset is-Ada
245@end ifset
246
247@subheading STATUS CODES:
248
249@table @b
250@item EBADF
251The logdes argument is not a valid log file descriptor.
252@item ENOSYS
253The function log_close() is not supported by t his implementation.
254
255@end table
256
257@subheading DESCRIPTION:
258
259The @code{log_close} function deallocates the open log file
260descriptor indicated by @code{log_des}.
261
262@subheading NOTES:
263
264@page
265@subsection log_seek - Reposition log file offset
266
267@subheading CALLING SEQUENCE:
268
269@ifset is-C
270@example
271int log_seek(
272  const logd_t    logdes,
273  log_recid_t     log_recid
274);
275@end example
276@end ifset
277
278@ifset is-Ada
279@end ifset
280
281@subheading STATUS CODES:
282
283@table @b
284@item EBADF
285The logdes argument is not a valid log file descriptor.
286@item EINTR
287The log_seek() function was interrupted by a signal.
288@item EINVAL
289The log_recid argument is not a valid record id.
290@item ENOSYS
291The function log_seek() is not supported by this implementation.
292
293@end table
294
295@subheading DESCRIPTION:
296
297The @code{log_seek} function shall set the log file offset of the open
298log descriptioin associated with the @code{logdes} log file descriptor to the
299event record in the log file identified by @code{log_recid}. 
300
301@subheading NOTES:
302
303@page
304@subsection log_severity_before - Compare event record severities
305
306@subheading CALLING SEQUENCE:
307
308@ifset is-C
309@example
310int log_severity_before(
311  log_severity_t  s1,
312  log_severity_t  s2
313);
314@end example
315@end ifset
316
317@ifset is-Ada
318@end ifset
319
320@subheading STATUS CODES:
321
322@table @b
323@item EINVAL
324The value of either s1 or s2 exceeds {LOG_SEVERITY_MAX}.
325@item ENOSYS
326The function log_severity_before() is not supported by this
327implementation.
328
329@end table
330
331@subheading DESCRIPTION:
332
333The @code{log_severity_before} function shall compare the severity order
334of the @code{s1} and @code{s2} arguments.
335
336@subheading NOTES:
337
338@page
339@subsection log_facilityemptyset - Manipulate log facility sets
340
341@subheading CALLING SEQUENCE:
342
343@ifset is-C
344@example
345int log_facilityemptyset(
346  log_facility_set_t  *set
347);
348@end example
349@end ifset
350
351@ifset is-Ada
352@end ifset
353
354@subheading STATUS CODES:
355
356@table @b
357@item EINVAL
358The facilityno argument is not a valid facility.
359@item ENOSYS
360The function is not supported by this implementation.
361
362@end table
363
364@subheading DESCRIPTION:
365
366@subheading NOTES:
367
368@page
369@subsection log_facilityfillset - Manipulate log facility sets
370
371@subheading CALLING SEQUENCE:
372
373@ifset is-C
374@example
375int log_facilityfillset(
376  log_facility_set_t  *set
377);
378@end example
379@end ifset
380
381@ifset is-Ada
382@end ifset
383
384@subheading STATUS CODES:
385
386@table @b
387@item EINVAL
388The facilityno argument is not a valid facility.
389@item ENOSYS
390The function is not supported by this implementation.
391
392@end table
393
394@subheading DESCRIPTION:
395
396@subheading NOTES:
397
398@page
399@subsection log_facilityaddset - Manipulate log facility sets
400
401@subheading CALLING SEQUENCE:
402
403@ifset is-C
404@example
405int log_facilityaddset(
406  log_facility_set_t  *set,
407  log_facility_t      facilityno
408);
409@end example
410@end ifset
411
412@ifset is-Ada
413@end ifset
414
415@subheading STATUS CODES:
416
417@table @b
418@item EINVAL
419The facilityno argument is not a valid facility.
420@item ENOSYS
421The function is not supported by this implementation.
422
423@end table
424
425@subheading DESCRIPTION:
426
427@subheading NOTES:
428
429@page
430@subsection log_facilitydelset - Manipulate log facility sets
431
432@subheading CALLING SEQUENCE:
433
434@ifset is-C
435@example
436int log_facilitydelset(
437  log_facility_set_t  *set,
438  log_facility_t      facilityno
439);
440@end example
441@end ifset
442
443@ifset is-Ada
444@end ifset
445
446@subheading STATUS CODES:
447
448@table @b
449@item EINVAL
450The facilityno argument is not a valid facility.
451@item ENOSYS
452The function is not supported by this implementation.
453
454@end table
455
456@subheading DESCRIPTION:
457
458@subheading NOTES:
459
460@page
461@subsection log_facilityismember - Manipulate log facility sets
462
463@subheading CALLING SEQUENCE:
464
465@ifset is-C
466@example
467int log_facilityismember(
468  const log_facility_set_t *set,
469  log_facility_t            facilityno,
470  const int                *member
471);
472@end example
473@end ifset
474
475@ifset is-Ada
476@end ifset
477
478@subheading STATUS CODES:
479
480@table @b
481@item EINVAL
482The facilityno argument is not a valid facility.
483@item ENOSYS
484The function is not supported by this implementation.
485
486@end table
487
488@subheading DESCRIPTION:
489
490@subheading NOTES:
491
Note: See TracBrowser for help on using the repository browser.