UDK 3.2.7 C/C++ API Reference
rtl/logfile.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*************************************************************************
00003  *
00004  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00005  *
00006  * Copyright 2000, 2010 Oracle and/or its affiliates.
00007  *
00008  * OpenOffice.org - a multi-platform office productivity suite
00009  *
00010  * This file is part of OpenOffice.org.
00011  *
00012  * OpenOffice.org is free software: you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 3
00014  * only, as published by the Free Software Foundation.
00015  *
00016  * OpenOffice.org is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License version 3 for more details
00020  * (a copy is included in the LICENSE file that accompanied this code).
00021  *
00022  * You should have received a copy of the GNU Lesser General Public License
00023  * version 3 along with OpenOffice.org.  If not, see
00024  * <http://www.openoffice.org/license.html>
00025  * for a copy of the LGPLv3 License.
00026  *
00027  ************************************************************************/
00028 #ifndef _RTL_LOGFILE_H_
00029 #define _RTL_LOGFILE_H_
00030 
00031 #include <sal/types.h>
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00037 
00052 SAL_DLLPUBLIC void SAL_CALL rtl_logfile_trace( const sal_Char* pszFormat, ... );
00053 
00066 SAL_DLLPUBLIC void SAL_CALL rtl_logfile_longTrace(char const * format, ...);
00067 
00074 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_logfile_hasLogFile( void );
00075 
00076 #ifdef __cplusplus
00077 }
00078 #endif
00079 
00080 #ifdef TIMELOG
00081 #define RTL_LOGFILE_TRACE( string )  \
00082              rtl_logfile_longTrace( "| : %s\n", string )
00083 #define RTL_LOGFILE_TRACE1( frmt, arg1 ) \
00084              rtl_logfile_longTrace( "| : " ); \
00085              rtl_logfile_trace( frmt, arg1 ); \
00086              rtl_logfile_trace( "\n" )
00087 
00088 #define RTL_LOGFILE_TRACE2( frmt, arg1 , arg2 ) \
00089              rtl_logfile_longTrace( "| : " ); \
00090              rtl_logfile_trace( frmt, arg1 , arg2 ); \
00091              rtl_logfile_trace( "\n" )
00092 #define RTL_LOGFILE_TRACE3( frmt, arg1 , arg2 , arg3 ) \
00093              rtl_logfile_longTrace( "| : " ); \
00094              rtl_logfile_trace( frmt, arg1 , arg2 , arg3 ); \
00095              rtl_logfile_trace( "\n" )
00096 
00097 //  Now the macros with project and author arguments.  The strings
00098 //  are formatted in a way, so that the log file can be parsed by
00099 //  post processing scripts.
00100 #define RTL_LOGFILE_TRACE_AUTHOR( project, author, string )  \
00101              rtl_logfile_longTrace( "| %s (%s) : %s\n", \
00102                                 project,\
00103                                 author,\
00104                                 string )
00105 #define RTL_LOGFILE_TRACE_AUTHOR1( project, author, frmt, arg1 ) \
00106              rtl_logfile_longTrace( "| %s (%s) : ", \
00107                                 project,\
00108                                 author );\
00109              rtl_logfile_trace( frmt, arg1 ); \
00110              rtl_logfile_trace( "\n" )
00111 
00112 #define RTL_LOGFILE_TRACE_AUTHOR2( project, author, frmt, arg1 , arg2 ) \
00113              rtl_logfile_longTrace( "| %s (%s) : ", \
00114                                 project,\
00115                                 author ); \
00116              rtl_logfile_trace( frmt, arg1 , arg2 ); \
00117              rtl_logfile_trace( "\n" )
00118 #define RTL_LOGFILE_TRACE_AUTHOR3( project, author, frmt, arg1 , arg2 , arg3 ) \
00119              rtl_logfile_longTrace( "| %s (%s) : ", \
00120                                 project,\
00121                                 author ); \
00122              rtl_logfile_trace( frmt, arg1 , arg2 , arg3 ); \
00123              rtl_logfile_trace( "\n" )
00124 #else
00125 #define RTL_LOGFILE_TRACE( string )  ((void)0)
00126 #define RTL_LOGFILE_TRACE1( frmt, arg1 ) ((void)0)
00127 #define RTL_LOGFILE_TRACE2( frmt, arg1 , arg2 ) ((void)0)
00128 #define RTL_LOGFILE_TRACE3( frmt, arg1 , arg2 , arg3 ) ((void)0)
00129 
00130 #define RTL_LOGFILE_TRACE_AUTHOR( project, author, string )  ((void)0)
00131 #define RTL_LOGFILE_TRACE_AUTHOR1( project, author, frmt, arg1 ) ((void)0)
00132 #define RTL_LOGFILE_TRACE_AUTHOR2( project, author, frmt, arg1 , arg2 ) ((void)0)
00133 #define RTL_LOGFILE_TRACE_AUTHOR3( project, author, frmt, arg1 , arg2 , arg3 ) ((void)0)
00134 #endif // TIMELOG
00135 #endif
00136 
00137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines