PR123: LD_LIBRARY_PATH and java.library.path
[cacao.git] / src / toolbox / logging.hpp
1 /* src/toolbox/logging.h - contains logging functions
2
3    Copyright (C) 1996-2005, 2006, 2007, 2008
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 #ifndef _LOGGING_H
27 #define _LOGGING_H
28
29 #include "config.h"
30
31 #include <stdio.h>
32 #include <stdarg.h>
33
34 #include "vm/class.hpp"
35 #include "vm/method.hpp"
36 #include "vm/utf8.h"
37
38
39 /* function prototypes ********************************************************/
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 void log_init(const char *fname);
46
47 void log_start(void);
48
49 void log_vprint(const char *text, va_list ap);
50 void log_print(const char *text, ...);
51 void log_println(const char *text, ...);
52
53 void log_finish(void);
54
55
56 /* log message functions */
57 void log_message_utf(const char *msg, utf *u);
58 void log_message_class(const char *msg, classinfo *c);
59 void log_message_class_message_class(const char *msg1, classinfo *c1,
60                                                                          const char *msg2, classinfo *c2);
61 void log_message_method(const char *msg, methodinfo *m);
62
63 #define log_text(s) log_println("%s", (s))
64 #define dolog log_println
65
66 #ifdef __cplusplus
67 }
68 #endif
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  */