LoggerDefines.h
Go to the documentation of this file.
00001 /*=============================================================================
00002   Copyright (C) 2012 Allied Vision Technologies.  All Rights Reserved.
00003 
00004   Redistribution of this file, in original or modified form, without
00005   prior written consent of Allied Vision Technologies is prohibited.
00006 
00007 -------------------------------------------------------------------------------
00008 
00009   File:        LoggerDefines.h
00010 
00011   Description: Definition of macros for logging.
00012                (This include file is for internal use only.)
00013 
00014 -------------------------------------------------------------------------------
00015 
00016   THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
00017   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
00018   NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE
00019   DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 
00020   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
00021   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00022   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  
00023   AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
00024   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00025   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00026 
00027 =============================================================================*/
00028 
00029 #ifndef AVT_VMBAPI_LOGGERDEFINES_H
00030 #define AVT_VMBAPI_LOGGERDEFINES_H
00031 
00032 #include <VimbaCPP/Include/UserLoggerDefines.h>
00033 
00034 #ifndef USER_LOGGER
00035 
00036     #include <VimbaCPP/Include/FileLogger.h>
00037 
00038     namespace AVT {
00039     namespace VmbAPI {
00040 
00041     #define LOGGER_DECL                         FileLogger
00042     #define LOGGER_DEF                          FileLogger( "VimbaCPP.log", true )
00043     #define LOGGER_LOG( logger, loggingInfo )   if ( NULL != (logger) ) (logger)->Log( loggingInfo );
00044 
00045 
00046     // These are all uses of LOGGER_DECL logger declarations
00047     typedef LOGGER_DECL* Logger;
00048 
00049     }}    
00050 
00051 #else
00052     #include <VimbaCPP/Include/UserLoggerDefines.h>
00053 #endif
00054 
00055 #include <VimbaCPP/Include/VimbaSystem.h>
00056 
00057 #define LOG_FREE_TEXT( txt )            std::string strExc( txt );\
00058                                         strExc.append( " in function: " );\
00059                                         strExc.append( __FUNCTION__ );\
00060                                         LOGGER_LOG( VimbaSystem::GetInstance().GetLogger(), strExc );
00061 
00062 #endif


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Thu Aug 27 2015 12:29:49