* Removed all Id tags.
[cacao.git] / src / toolbox / logging.h
1 /* src/toolbox/logging.h - contains logging functions
2
3    Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6    J. Wenninger, Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25 */
26
27
28 #ifndef _LOGGING_H
29 #define _LOGGING_H
30
31 #include "config.h"
32
33 #include <stdio.h>
34 #include <stdarg.h>
35
36 #include "vmcore/class.h"
37 #include "vmcore/method.h"
38 #include "vmcore/utf8.h"
39
40
41 /*500 is to small for eclipse traces, (builtin_trace_args, perhaps the
42 buffer should be created there dynamically, if the text is longer,
43 instead of setting the size for all invocations that big*/
44
45 #define MAXLOGTEXT  16383 
46
47 /* function prototypes ********************************************************/
48
49 void log_init(const char *fname);
50
51 void log_start(void);
52
53 void log_vprint(const char *text, va_list ap);
54 void log_print(const char *text, ...);
55 void log_println(const char *text, ...);
56
57 void log_finish(void);
58
59
60 /* log message functions */
61 void log_message_utf(const char *msg, utf *u);
62 void log_message_class(const char *msg, classinfo *c);
63 void log_message_class_message_class(const char *msg1, classinfo *c1,
64                                                                          const char *msg2, classinfo *c2);
65 void log_message_method(const char *msg, methodinfo *m);
66
67 #define log_text(s) log_println("%s", (s))
68 #define dolog log_println
69
70 #endif /* _LOGGING_H */
71
72
73 /*
74  * These are local overrides for various environment variables in Emacs.
75  * Please do not remove this and leave it at the end of the file, where
76  * Emacs will automagically detect them.
77  * ---------------------------------------------------------------------
78  * Local variables:
79  * mode: c
80  * indent-tabs-mode: t
81  * c-basic-offset: 4
82  * tab-width: 4
83  * End:
84  */