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  * This file is part of the LibreOffice project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * This file incorporates work covered by the following license notice:
00010  *
00011  *   Licensed to the Apache Software Foundation (ASF) under one or more
00012  *   contributor license agreements. See the NOTICE file distributed
00013  *   with this work for additional information regarding copyright
00014  *   ownership. The ASF licenses this file to you under the Apache
00015  *   License, Version 2.0 (the "License"); you may not use this file
00016  *   except in compliance with the License. You may obtain a copy of
00017  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
00018  */
00019 #ifndef _RTL_LOGFILE_H_
00020 #define _RTL_LOGFILE_H_
00021 
00022 #include "sal/config.h"
00023 
00024 #include "sal/saldllapi.h"
00025 #include "sal/types.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 
00046 SAL_DLLPUBLIC void SAL_CALL rtl_logfile_trace( const sal_Char* pszFormat, ... );
00047 
00060 SAL_DLLPUBLIC void SAL_CALL rtl_logfile_longTrace(char const * format, ...);
00061 
00068 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_logfile_hasLogFile( void );
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073 
00074 #ifdef TIMELOG
00075 #define RTL_LOGFILE_TRACE( string )  \
00076              rtl_logfile_longTrace( "| : %s\n", string )
00077 #define RTL_LOGFILE_TRACE1( frmt, arg1 ) \
00078              rtl_logfile_longTrace( "| : " ); \
00079              rtl_logfile_trace( frmt, arg1 ); \
00080              rtl_logfile_trace( "\n" )
00081 
00082 #define RTL_LOGFILE_TRACE2( frmt, arg1 , arg2 ) \
00083              rtl_logfile_longTrace( "| : " ); \
00084              rtl_logfile_trace( frmt, arg1 , arg2 ); \
00085              rtl_logfile_trace( "\n" )
00086 #define RTL_LOGFILE_TRACE3( frmt, arg1 , arg2 , arg3 ) \
00087              rtl_logfile_longTrace( "| : " ); \
00088              rtl_logfile_trace( frmt, arg1 , arg2 , arg3 ); \
00089              rtl_logfile_trace( "\n" )
00090 
00091 //  Now the macros with project and author arguments.  The strings
00092 //  are formatted in a way, so that the log file can be parsed by
00093 //  post processing scripts.
00094 #define RTL_LOGFILE_TRACE_AUTHOR( project, author, string )  \
00095              rtl_logfile_longTrace( "| %s (%s) : %s\n", \
00096                                 project,\
00097                                 author,\
00098                                 string )
00099 #define RTL_LOGFILE_TRACE_AUTHOR1( project, author, frmt, arg1 ) \
00100              rtl_logfile_longTrace( "| %s (%s) : ", \
00101                                 project,\
00102                                 author );\
00103              rtl_logfile_trace( frmt, arg1 ); \
00104              rtl_logfile_trace( "\n" )
00105 
00106 #define RTL_LOGFILE_TRACE_AUTHOR2( project, author, frmt, arg1 , arg2 ) \
00107              rtl_logfile_longTrace( "| %s (%s) : ", \
00108                                 project,\
00109                                 author ); \
00110              rtl_logfile_trace( frmt, arg1 , arg2 ); \
00111              rtl_logfile_trace( "\n" )
00112 #define RTL_LOGFILE_TRACE_AUTHOR3( project, author, frmt, arg1 , arg2 , arg3 ) \
00113              rtl_logfile_longTrace( "| %s (%s) : ", \
00114                                 project,\
00115                                 author ); \
00116              rtl_logfile_trace( frmt, arg1 , arg2 , arg3 ); \
00117              rtl_logfile_trace( "\n" )
00118 #else
00119 #define RTL_LOGFILE_TRACE( string )  ((void)0)
00120 #define RTL_LOGFILE_TRACE1( frmt, arg1 ) ((void)0)
00121 #define RTL_LOGFILE_TRACE2( frmt, arg1 , arg2 ) ((void)0)
00122 #define RTL_LOGFILE_TRACE3( frmt, arg1 , arg2 , arg3 ) ((void)0)
00123 
00124 #define RTL_LOGFILE_TRACE_AUTHOR( project, author, string )  ((void)0)
00125 #define RTL_LOGFILE_TRACE_AUTHOR1( project, author, frmt, arg1 ) ((void)0)
00126 #define RTL_LOGFILE_TRACE_AUTHOR2( project, author, frmt, arg1 , arg2 ) ((void)0)
00127 #define RTL_LOGFILE_TRACE_AUTHOR3( project, author, frmt, arg1 , arg2 , arg3 ) ((void)0)
00128 #endif // TIMELOG
00129 #endif
00130 
00131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines