1
/*********************************************************
2
* Copyright (C) 2006 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License as published
6
* by the Free Software Foundation version 2.1 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
11
* License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
*********************************************************/
22
* All-purpose logging facility. The API is not intended to be
23
* called from the application code. Instead the application
24
* should re-implement DLWP with ToolsLogger_Log() (before, they
25
* use printf()/fprintf()/OutputDebugString()).
29
* #include "toolsLogger.h"
31
* GuestApp_Dict *confDict = Conf_Load();
33
* ToolsLogger_Init(progName, confDict);
35
* Log("a log msg") // == ToolsLogger_Log(TOOLSLOG_TYPE_LOG, "a log msg");
36
* Warning("a warning msg"); // == ToolsLogger_Log(TOOLSLOG_TYPE_WARNING,
37
* // "a warning msg");
39
* Panic("a panic msg"); // == ToolsLogger_Log(TOOLSLOG_TYPE_PANIC,
40
* // "a panic msg"); exit(1);
42
* ToolsLogger_Cleanup();
46
#ifndef __TOOLSLOGGER_H__
47
# define __TOOLSLOGGER_H__
61
TOOLSLOG_TYPE_WARNING,
64
TOOLSLOG_TYPE_LAST /* Must be the last one */
68
Bool ToolsLogger_Init(const char *progName, GuestApp_Dict *conf);
70
void ToolsLogger_Log(ToolsLogType type,
74
void ToolsLogger_LogV(ToolsLogType type,
78
void ToolsLogger_Cleanup(void);
86
#endif /* __TOOLSLOGGER_H__ */