Log.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2009, 2013 IBM Corp.
3  *
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v2.0
6  * and Eclipse Distribution License v1.0 which accompany this distribution.
7  *
8  * The Eclipse Public License is available at
9  * https://www.eclipse.org/legal/epl-2.0/
10  * and the Eclipse Distribution License is available at
11  * http://www.eclipse.org/org/documents/edl-v10.php.
12  *
13  * Contributors:
14  * Ian Craggs - initial API and implementation and/or initial documentation
15  * Ian Craggs - updates for the async client
16  *******************************************************************************/
17 
18 #if !defined(LOG_H)
19 #define LOG_H
20 
21 /*BE
22 map LOG_LEVELS
23 {
24  "TRACE_MAXIMUM" 1
25  "TRACE_MEDIUM" 2
26  "TRACE_MINIMUM" 3
27  "TRACE_PROTOCOL" 4
28 
29  "ERROR" 5
30  "SEVERE" 6
31  "FATAL" 7
32 }
33 BE*/
34 
35 enum LOG_LEVELS {
44 };
45 
46 
47 /*BE
48 def trace_settings_type
49 {
50  n32 map LOG_LEVELS "trace_level"
51  n32 dec "max_trace_entries"
52  n32 dec "trace_output_level"
53 }
54 BE*/
55 typedef struct
56 {
57  enum LOG_LEVELS trace_level;
61 
63 
64 #define LOG_PROTOCOL TRACE_PROTOCOL
65 #define TRACE_MAX TRACE_MAXIMUM
66 #define TRACE_MIN TRACE_MINIMUM
67 #define TRACE_MED TRACE_MEDIUM
68 
69 typedef struct
70 {
71  const char* name;
72  const char* value;
74 
76 void Log_terminate(void);
77 
78 void Log(enum LOG_LEVELS, int, const char *, ...);
79 void Log_stackTrace(enum LOG_LEVELS, int, int, int, const char*, int, int*);
80 
81 typedef void Log_traceCallback(enum LOG_LEVELS level, const char *message);
83 void Log_setTraceLevel(enum LOG_LEVELS level);
84 
85 #endif
Definition: Log.h:43
void Log_setTraceCallback(Log_traceCallback *callback)
Definition: Log.c:218
LOG_LEVELS
Definition: Log.h:35
int max_trace_entries
Definition: Log.h:58
void Log(enum LOG_LEVELS, int, const char *,...)
Definition: Log.c:417
void Log_terminate(void)
Definition: Log.c:232
trace_settings_type trace_settings
Definition: Log.c:67
void Log_stackTrace(enum LOG_LEVELS, int, int, int, const char *, int, int *)
Definition: Log.c:448
Definition: Log.h:42
Definition: Log.h:41
static enum LOG_LEVELS trace_output_level
Definition: Log.c:104
int Log_initialize(Log_nameValue *)
Definition: Log.c:132
const char * value
Definition: Log.h:72
void Log_traceCallback(enum LOG_LEVELS level, const char *message)
Definition: Log.h:81
const char * name
Definition: Log.h:71
void Log_setTraceLevel(enum LOG_LEVELS level)
Definition: Log.c:224


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:09