LoggerDefines.h
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
3 
4  Redistribution of this file, in original or modified form, without
5  prior written consent of Allied Vision Technologies is prohibited.
6 
7 -------------------------------------------------------------------------------
8 
9  File: LoggerDefines.h
10 
11  Description: Definition of macros for logging.
12  (This include file is for internal use only.)
13 
14 -------------------------------------------------------------------------------
15 
16  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
17  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
18  NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
20  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
24  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 
27 =============================================================================*/
28 
29 #ifndef AVT_VMBAPI_LOGGERDEFINES_H
30 #define AVT_VMBAPI_LOGGERDEFINES_H
31 
33 
34 #ifndef USER_LOGGER
35 
37 
38  namespace AVT {
39  namespace VmbAPI {
40 
41  #define LOGGER_DECL FileLogger
42  #define LOGGER_DEF FileLogger( "VimbaCPP.log", true )
43  #define LOGGER_LOG( logger, loggingInfo ) if ( NULL != (logger) ) (logger)->Log( loggingInfo );
44 
45 
46  // These are all uses of LOGGER_DECL logger declarations
47  typedef LOGGER_DECL* Logger;
48 
49  }}
50 
51 #else
53 #endif
54 
56 
57 #define LOG_FREE_TEXT( txt ) std::string strExc( txt );\
58  strExc.append( " in function: " );\
59  strExc.append( __FUNCTION__ );\
60  LOGGER_LOG( VimbaSystem::GetInstance().GetLogger(), strExc );
61 
62 #endif
#define LOGGER_DECL
Definition: LoggerDefines.h:41
LOGGER_DECL * Logger
Definition: LoggerDefines.h:47


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Mon Jun 10 2019 12:50:39