Matrix Science header

ms_log.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_log.hpp                                                           #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates a general-purpose error object that collects information      #
00006 # about several consecutive erros                                            #
00007 ##############################################################################
00008 # COPYRIGHT NOTICE                                                           #
00009 # Copyright 1998-2018 Matrix Science Limited  All Rights Reserved.           #
00010 #                                                                            #
00011 ##############################################################################
00012 #    $Archive:: /Mowse/ms_mascotresfile/include/ms_errors.hpp              $ #
00013 #     $Author: robertog@matrixscience.com $ #
00014 #       $Date: 2022-01-21 10:45:21 +0000 $ #
00015 #   $Revision: 9c3ccb8f3d173eef7cffd2b17803e1b7dac3efa7 | MSPARSER_REL_2_8_1-0-gea32989045 $ #
00016 # $NoKeywords::                                                            $ #
00017 ##############################################################################
00018 */
00019 
00020 #ifndef MS_LOG_HPP
00021 #define MS_LOG_HPP
00022 
00023 
00024 #include <cstdarg>
00025 #include <vector>
00026 #include <string>
00027 #include <map>
00028 #include <set>
00029 #include <utility>
00030 
00031 namespace matrix_science {
00037 
00038     class MS_MASCOTRESFILE_API ms_log
00039     {
00040     public:
00042 
00047         enum msg_sev {
00048             sev_fatal  = 1,  
00049             sev_warn   = 2,  
00050             sev_info   = 3,  
00051             sev_debug1 = 4,  
00052             sev_debug2 = 5,  
00053             sev_debug3 = 6   
00054         };
00055 
00057 
00127         typedef int msg_num_t;
00128 
00129 #ifndef SWIG
00130         typedef struct {
00131             ms_log::msg_sev     severity;
00132             ms_log::msg_num_t   msgNum;
00133             const char        * pMsgText;
00134         } msg_catalog_t;
00135         typedef std::map<ms_log::msg_num_t, const msg_catalog_t *> catalog_map_t;
00136 #endif
00137 
00138         static const msg_num_t LOGMSG_DBG1_NUM_PROCESSOR_GROUPS        = 0x00010160; 
00139         static const msg_num_t LOGMSG_DBG3_HWLOC_TREE                  = 0x00010161; 
00140         static const msg_num_t LOGMSG_DBG3_HWLOC_GROUPS                = 0x00010162; 
00141         static const msg_num_t LOGMSG_DBG3_AUTO_DETECT_NUM_THREAD      = 0x00010163; 
00142         static const msg_num_t LOGMSG_DBG3_CALL_GET_CHIP_MFCTR         = 0x00010164; 
00143         static const msg_num_t LOGMSG_DBG3_PROCESSOR_NAME              = 0x00010165; 
00144         static const msg_num_t LOGMSG_DBG3_BINDING_PROCESSORS          = 0x00010166; 
00145         static const msg_num_t LOGMSG_DBG3_BINDING_THREAD              = 0x00010167; 
00146         static const msg_num_t LOGMSG_DBG2_NUM_CONFIG_MISMATCH         = 0x00010168; 
00147         static const msg_num_t LOGMSG_DBG2_NUM_ONLINE_MISMATCH         = 0x00010169; 
00148         static const msg_num_t LOGMSG_DBG2_CPU_INF_NUM_ON_SYS          = 0x00010170; 
00149         static const msg_num_t LOGMSG_DBG2_CPU_INF_NUM_AVAIL           = 0x00010171; 
00150         static const msg_num_t LOGMSG_DBG2_CPU_INF_NUM_GROUPS          = 0x00010172; 
00151         static const msg_num_t LOGMSG_DBG2_CPU_INF_NAME                = 0x00010173; 
00152         static const msg_num_t LOGMSG_DBG2_CPU_INF_PROC_AFFINITY       = 0x00010174; 
00153         static const msg_num_t LOGMSG_DBG2_CPU_INF_USE_PROCESSES       = 0x00010175; 
00154         static const msg_num_t LOGMSG_DBG2_CPU_INF_NUM_PHYSICAL        = 0x00010176; 
00155         static const msg_num_t LOGMSG_DBG2_CPU_INF_LOGI_PER_PHYS       = 0x00010177; 
00156         static const msg_num_t LOGMSG_DBG2_CPU_INF_CORE_PER_PHYS       = 0x00010178; 
00157         static const msg_num_t LOGMSG_DBG2_CPU_INF_GETAUTODETECT       = 0x00010179; 
00158         static const msg_num_t LOGMSG_DBG2_CPU_INF_MT_NAME             = 0x0001017A; 
00159         static const msg_num_t LOGMSG_DBG2_CPU_INF_MT_STATUS           = 0x0001017B; 
00160         static const msg_num_t LOGMSG_DBG2_CPU_INF_TABLE_TITLE         = 0x0001017C; 
00161         static const msg_num_t LOGMSG_DBG2_CPU_INF_TABLE_LINE          = 0x0001017D; 
00162 
00163         // Installer logging messages
00164         static const msg_num_t LOGMSG_INST_LOGICALPERPHYSICALCPU       = 0x00010200; 
00165         static const msg_num_t LOGMSG_INST_NUMTHREADS                  = 0x00010201; 
00166         static const msg_num_t LOGMSG_INST_NOTMASCOTDATOK              = 0x00010202; 
00167         static const msg_num_t LOGMSG_INST_MASCOTDATOK                 = 0x00010203; 
00168         static const msg_num_t LOGMSG_INST_APPENDTAXONOMY              = 0x00010204; 
00169         static const msg_num_t LOGMSG_INST_ADDINGDATABASE              = 0x00010205; 
00170         static const msg_num_t LOGMSG_INST_CHANGEDBTAXONOMY            = 0x00010206; 
00171         static const msg_num_t LOGMSG_INST_APPENDPARSERULE             = 0x00010207; 
00172         static const msg_num_t LOGMSG_INST_ADDOPTIONSSECTION           = 0x00010208; 
00173         static const msg_num_t LOGMSG_INST_SETOPTIONSSECTION           = 0x00010209; 
00174         static const msg_num_t LOGMSG_INST_CLUSTERSECTION              = 0x0001020A; 
00175         static const msg_num_t LOGMSG_INST_NOSUBCLUSTERSET             = 0x0001020B; 
00176         static const msg_num_t LOGMSG_INST_CHANGEPARSERULE             = 0x0001020C; 
00177         static const msg_num_t LOGMSG_INST_SAVEDPOSTINSTALLFILE        = 0x0001020D; 
00178         static const msg_num_t LOGMSG_INST_FAILSAVEPOSTINSTALLFILE     = 0x0001020E; 
00179         static const msg_num_t LOGMSG_INST_REMOVEOPTIONSSECTION        = 0x0001020F; 
00180         static const msg_num_t LOGMSG_INST_CHANGEPERCOLATORFEATS       = 0x00010210; 
00181         static const msg_num_t LOGMSG_INST_CHANGEPROTFAMILYSWITCH      = 0x00010211; 
00182 
00183         static const msg_num_t LOGMSG_HTTP_URLSTRING                   = 0x00010300; 
00184         static const msg_num_t LOGMSG_HTTP_QUERYSTATUSRESULT           = 0x00010301; 
00185         static const msg_num_t LOGMSG_HTTP_MAXCONECTIONSFAILED         = 0x00010302; 
00186         static const msg_num_t LOGMSG_HTTP_MAXCONECTIONS10FAILED       = 0x00010303; 
00187         static const msg_num_t LOGMSG_HTTP_GETRETURNSTRING             = 0x00010304; 
00188 
00189 
00190         // Quantitation logging messages
00191         static const msg_num_t LOGMSG_CUSTQUANT_ADD_QUANT_KEY          = 0x00010400; 
00192         static const msg_num_t LOGMSG_CUSTQUANT_REMOVE_ALL_KEY         = 0x00010401; 
00193         static const msg_num_t LOGMSG_CUSTQUANT_REMOVE_KEY             = 0x00010402; 
00194         static const msg_num_t LOGMSG_QUANT_START_UPDATE_PROT_MATCHES  = 0x00010403; 
00195         static const msg_num_t LOGMSG_QUANT_FINISH_UPDATE_PROT_MATCHES = 0x00010404; 
00196         static const msg_num_t LOGMSG_QUANT_START_CALC_COMPLETE        = 0x00010405; 
00197         static const msg_num_t LOGMSG_QUANT_FINISH_CALC_COMPLETE       = 0x00010406; 
00198         static const msg_num_t LOGMSG_QUANT_START_LOAD_CDB             = 0x00010408; 
00199         static const msg_num_t LOGMSG_QUANT_FINISH_LOAD_CDB            = 0x00010409; 
00200         static const msg_num_t LOGMSG_QUANT_LOAD_PEP_STATUS_MATCHES    = 0x0001040A; 
00201         static const msg_num_t LOGMSG_QUANT_LOADING_MATCHES            = 0x0001040B; 
00202         static const msg_num_t LOGMSG_QUANT_UPDATING_PEP_EVIDENCE      = 0x0001040C; 
00203         static const msg_num_t LOGMSG_QUANT_REAPPLY_THRESHOLDS         = 0x0001040D; 
00204         static const msg_num_t LOGMSG_QUANT_UPDATE_EXCLUDED_MATCHES    = 0x0001040E; 
00205         static const msg_num_t LOGMSG_QUANT_CALC_COMPLETE_ON_MERGED    = 0x0001040F; 
00206         static const msg_num_t LOGMSG_QUANT_REMATCHING_INFERRED        = 0x00010410; 
00207         static const msg_num_t LOGMSG_QUANT_EXCLUDING_PEPTIDE          = 0x00010411; 
00208         static const msg_num_t LOGMSG_QUANT_EXCLUDING_PEPTIDE_LESSTHAN = 0x00010412; 
00209         static const msg_num_t LOGMSG_QUANT_EXCLUDING_PEPTIDE_GREATHAN = 0x00010413; 
00210         static const msg_num_t LOGMSG_QUANT_REMOVE_MATCH_NO_EVIDENCE   = 0x00010414; 
00211         static const msg_num_t LOGMSG_QUANT_REMOVE_INFERRED_MATCH      = 0x00010415; 
00212         static const msg_num_t LOGMSG_QUANT_ADDING_PROTEIN_HIT         = 0x00010416; 
00213         static const msg_num_t LOGMSG_QUANT_ADDED_PROTEIN_HIT          = 0x00010417; 
00214         static const msg_num_t LOGMSG_QUANT_OPENING_CACHE_FILE         = 0x00010418; 
00215         static const msg_num_t LOGMSG_QUANT_CLOSING_CACHE_FILE         = 0x00010419; 
00216         static const msg_num_t LOGMSG_QUANT_START_REORDER_AFTER_MERGE  = 0x0001041A; 
00217         static const msg_num_t LOGMSG_QUANT_FINISH_REORDER_AFTER_MERGE = 0x0001041B; 
00218 
00219         // ms_matrix (mathematical matrix, not matrix science) debugging
00220         static const msg_num_t LOGMSG_MATRIX_OUTPUT_VALS               = 0x00010500; 
00221 
00222         // ms_aahelper tracing
00223         static const msg_num_t LOGMSG_AAHELPER_CFR_NUM_FRAGMENTS       = 0x00010600; 
00224         static const msg_num_t LOGMSG_AAHELPER_REGULAR_ION_REJECT      = 0x00010601; 
00225         static const msg_num_t LOGMSG_AAHELPER_REGULAR_ION_ADD         = 0x00010602; 
00226         static const msg_num_t LOGMSG_AAHELPER_REGULAR_PRIME_ION_REJECT= 0x00010603; 
00227         static const msg_num_t LOGMSG_AAHELPER_REGULAR_PRIME_ION_ADD   = 0x00010604; 
00228         static const msg_num_t LOGMSG_AAHELPER_IMMONIUM_ION_REJECT     = 0x00010605; 
00229         static const msg_num_t LOGMSG_AAHELPER_IMMONIUM_ION_ADD        = 0x00010606; 
00230         static const msg_num_t LOGMSG_AAHELPER_INTERNAL_ION_REJECT     = 0x00010607; 
00231         static const msg_num_t LOGMSG_AAHELPER_INTERNAL_ION_ADD        = 0x00010608; 
00232         static const msg_num_t LOGMSG_AAHELPER_CROSSLINKED_START       = 0x00010609; 
00233         static const msg_num_t LOGMSG_AAHELPER_MULTINL_INDICES         = 0x0001060A; 
00234         static const msg_num_t LOGMSG_AAHELPER_MASTER_NL_VALS          = 0x0001060B; 
00235         static const msg_num_t LOGMSG_AAHELPER_TOTAL_NL_VALS           = 0x0001060C; 
00236         static const msg_num_t LOGMSG_AAHELPER_CUMULATIVE_MASS_NL      = 0x0001060D; 
00237         static const msg_num_t LOGMSG_AAHELPER_SERIES_PARAMS           = 0x0001060E; 
00238         static const msg_num_t LOGMSG_AAHELPER_CALC_MASS_MAX_REACHED   = 0x0001060F; 
00239         static const msg_num_t LOGMSG_AAHELPER_CALC_MASS_SKIP_D_PRIME_RES = 0x00010610; 
00240         static const msg_num_t LOGMSG_AAHELPER_CALC_MASS_SKIP_D_RESIDUE = 0x00010611; 
00241         static const msg_num_t LOGMSG_AAHELPER_CALC_MASS_SKIP_V_RESIDUE = 0x00010612; 
00242         static const msg_num_t LOGMSG_AAHELPER_CALC_MASS_SKIP_W_PRIME_RES = 0x00010613; 
00243         static const msg_num_t LOGMSG_AAHELPER_CALC_MASS_SKIP_W_RESIDUE = 0x00010614; 
00244         static const msg_num_t LOGMSG_AAHELPER_ETMOD_LOOKUP            = 0x00010615; 
00245         static const msg_num_t LOGMSG_AAHELPER_SETUP_FROM_PRE2_2_INIT  = 0x00010616; 
00246         static const msg_num_t LOGMSG_AAHELPER_SETUP_FROM_PRE2_2_ANYCHNG = 0x00010617; 
00247         static const msg_num_t LOGMSG_AAHELPER_CFR_START_FRAGMENTS     = 0x00010618; 
00248         static const msg_num_t LOGMSG_AAHELPER_CROSSLINKED_END         = 0x00010619; 
00249         static const msg_num_t LOGMSG_AAHELPER_CFR_SET_QUANT_COMPONENT = 0x0001061A; 
00250         static const msg_num_t LOGMSG_AAHELPER_CFR_MASSES_VALUE        = 0x0001061B; 
00251         static const msg_num_t LOGMSG_AAHELPER_CFR_MOD_DELTA_AT_SITE   = 0x0001061C; 
00252         static const msg_num_t LOGMSG_AAHELPER_CFR_INIT_VARMOD_IS_LINKER   = 0x0001061D; 
00253         static const msg_num_t LOGMSG_AAHELPER_CFR_INIT_VARMOD_IS_MONOLINK = 0x0001061E; 
00254         static const msg_num_t LOGMSG_AAHELPER_CFR_LOOPLINKING_MASK    = 0x0001061F; 
00255 
00256         // ms_proteininference tracing
00257         static const msg_num_t LOGMSG_PROTINFER_FIND_FAMILY_START      = 0x00010700; 
00258         static const msg_num_t LOGMSG_PROTINFER_FIND_FAMILY_QUEUE      = 0x00010701; 
00259         static const msg_num_t LOGMSG_PROTINFER_FIND_FAMILY_REP_SEQS   = 0x00010702; 
00260         static const msg_num_t LOGMSG_PROTINFER_PEPTIDE_MATRIX         = 0x00010703; 
00261         static const msg_num_t LOGMSG_PROTINFER_FIND_FAMILY_END        = 0x00010704; 
00262         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_START     = 0x00010705; 
00263         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_SAMESET_PARENT_LIST = 0x00010706; 
00264         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_SAMESET_LEAD_LIST   = 0x00010707; 
00265         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_DISCARDED_SL_LIST   = 0x00010708; 
00266         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_ELIMINATION             = 0x00010709; 
00267         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_ELIMINATION_MEMBER_LIST = 0x0001070A; 
00268         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_ELIMINATION_LEAD_LIST   = 0x0001070B; 
00269         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_ELIMINATION_SUBSET_LIST = 0x0001070C; 
00270         static const msg_num_t LOGMSG_PROTINFER_ELIMINATE_INTERSECTIONS_FREE_COUNT_ZERO = 0x0001070D; 
00271         static const msg_num_t LOGMSG_PROTINFER_ELIMINATE_INTERSECTIONS_NEXT            = 0x0001070E; 
00272         static const msg_num_t LOGMSG_PROTINFER_ELIMINATE_INTERSECTIONS_SUPERSET_LIST   = 0x0001070F; 
00273         static const msg_num_t LOGMSG_PROTINFER_CHOOSE_NEXT_START          = 0x00010710; 
00274         static const msg_num_t LOGMSG_PROTINFER_CHOOSE_NEXT_SUPERSET_EMPTY = 0x00010711; 
00275         static const msg_num_t LOGMSG_PROTINFER_CHOOSE_NEXT_SUPERSET_LIST  = 0x00010712; 
00276         static const msg_num_t LOGMSG_PROTINFER_CHOOSE_NEXT_KEEP           = 0x00010713; 
00277         static const msg_num_t LOGMSG_PROTINFER_REMOVE_CONFLICTING_START   = 0x00010714; 
00278         static const msg_num_t LOGMSG_PROTINFER_REMOVE_CONFLICTING_KEEP    = 0x00010715; 
00279         static const msg_num_t LOGMSG_PROTINFER_REMOVE_CONFLICTING_DISCARD = 0x00010716; 
00280         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_START        = 0x00010717; 
00281         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_CREATE       = 0x00010718; 
00282         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_CREATED      = 0x00010719; 
00283         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_NO_PROTEINS  = 0x0001071A; 
00284         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_REMOVE_MINPROTEINSCORE  = 0x0001071B; 
00285         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_REMOVE_MAXHITS          = 0x0001071C; 
00286         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_REMOVE_LONGESTPEPLEN    = 0x0001071D; 
00287         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_REMOVE_LONGESTSIGPEPLEN = 0x0001071E; 
00288         static const msg_num_t LOGMSG_PROTINFER_SUBSET_STARTS_NEW_HIT                 = 0x0001071F; 
00289         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_REMOVE_CHECKBOLD        = 0x00010720; 
00290         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_NEXT_PROTEIN = 0x00010721; 
00291         static const msg_num_t LOGMSG_PROTINFER_SORT_BY_SCORE_DONE         = 0x00010722; 
00292         static const msg_num_t LOGMSG_PROTINFER_FIND_MATCHES_PROTEIN_START = 0x00010723; 
00293         static const msg_num_t LOGMSG_PROTINFER_FIND_MATCHES_SUBSET_START  = 0x00010724; 
00294         static const msg_num_t LOGMSG_PROTINFER_FIND_MATCHES_PROTEIN_END   = 0x00010725; 
00295         static const msg_num_t LOGMSG_PROTINFER_CLUSTER_FROM_ACC           = 0x00010726; 
00296         static const msg_num_t LOGMSG_PROTINFER_GROUP_FROM_ACC             = 0x00010727; 
00297         static const msg_num_t LOGMSG_PROTINFER_SINGLETON_FROM_ACC         = 0x00010728; 
00298         static const msg_num_t LOGMSG_PEPSUM_GETHIT                        = 0x00010729; 
00299         static const msg_num_t LOGMSG_PROTINFER_NUM_PEPTIDES_IN_FAMILY     = 0x0001072A; 
00300         static const msg_num_t LOGMSG_PROTINFER_GROUP_FAMILY_PULL_IN       = 0x0001072B; 
00301 
00302         // ms_quant_helper tracing
00303         static const msg_num_t LOGMSG_QUANT_HELPER_TEST_REQUIRED           = 0x00010800; 
00304 
00305         // Generic tracing messages
00306         static const msg_num_t LOGMSG_REPORT_FUNCTION_CALLED_BY            = 0x00010900; 
00307         static const msg_num_t LOGMSG_REPORT_FUNCTION_ENTRY                = 0x00010901; 
00308         static const msg_num_t LOGMSG_REPORT_FUNCTION_ENTRY_WITH_ARGS1     = 0x00010902; 
00309         static const msg_num_t LOGMSG_REPORT_FUNCTION_ENTRY_WITH_ARGS2     = 0x00010903; 
00310         static const msg_num_t LOGMSG_REPORT_FUNCTION_ENTRY_WITH_ARGS3     = 0x00010904; 
00311         static const msg_num_t LOGMSG_REPORT_FUNCTION_ENTRY_WITH_ARGS4     = 0x00010905; 
00312 
00313         static const msg_num_t LOGMSG_REPORT_FUNCTION_EXIT                 = 0x00010910; 
00314         static const msg_num_t LOGMSG_REPORT_FUNCTION_EXIT_WITH            = 0x00010911; 
00315 
00316         // ms_mascotresfile or ms_mascotresults tracing
00317         static const msg_num_t LOGMSG_RESFILE_APPEND                       = 0x00010A00; 
00318         static const msg_num_t LOGMSG_GET_THRESHOLD_FOR_FIRST_PASS_FDR     = 0x00010A01; 
00319         static const msg_num_t LOGMSG_GET_THRESHOLD_FOR_FDR_FOR_ET         = 0x00010A02; 
00320         static const msg_num_t LOGMSG_GET_THR_LOOP_BODY_START              = 0x00010A03; 
00321         static const msg_num_t LOGMSG_GET_THR_LOOP_BODY_ZERO_COUNT         = 0x00010A04; 
00322         static const msg_num_t LOGMSG_GET_THR_LOOP_BODY_MIN_FOUND          = 0x00010A05; 
00323         static const msg_num_t LOGMSG_GET_THR_REACH_COND                   = 0x00010A06; 
00324 
00325     public:
00327         ms_log();
00328 
00330         virtual ~ms_log();
00331 
00332     public:
00333 #ifndef SWIG
00334 #if defined(_INTERNAL_USE_AND_HAVE_BOOST_FORMAT) || defined(DOXYGEN_SHOULD_SKIP_THIS)
00335 
00337 
00344         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum) {
00345             ms_log::msg_sev severity;
00346             std::string unformattedMsg = _lookUpMsg(msgNum, severity);
00347             _setError(static_cast<int>(msgNum), unformattedMsg.c_str(), severity, "", -1, lineNum, srcFile);
00348         }
00349 
00350 
00352         template <typename T1>
00353         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1);
00354 
00356         template <typename T1, typename T2>
00357         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2);
00358 
00360         template <typename T1, typename T2, typename T3>
00361         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2, T3 arg3);
00362 
00364         template <typename T1, typename T2, typename T3, typename T4>
00365         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2, T3 arg3, T4 arg4);
00366 
00368         template <typename T1, typename T2, typename T3, typename T4, typename T5>
00369         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
00370 
00372         template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
00373         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
00374 
00376         template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
00377         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
00378 
00380         template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
00381         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
00382 
00384         template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
00385         void logMessage(ms_log::msg_num_t msgNum, const char * srcFile, const int lineNum, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
00386 #endif
00387 #endif
00388 
00390         virtual msg_sev getLoggingLevel() const = 0;
00391 
00393         bool willMessageBeLogged(const msg_num_t msgNum) const;
00394 
00396         std::string _lookUpMsg(const ms_log::msg_num_t msgNum, ms_log::msg_sev & severity) const;
00397 
00399         ms_log::msg_sev getMessageSeverity(const ms_log::msg_num_t msgNum) const;
00400 
00402         ms_loggingmonitor::Source_e getMessageSource(const ms_log::msg_num_t msgNum) const;
00403 
00404 #ifndef SWIG
00405         enum errorOrLogMessages_e { MSG_LOG, MSG_ERR };
00406 
00408         void addToCatalog(const msg_catalog_t catalog[], size_t numEntries, ms_loggingmonitor::Source_e src, errorOrLogMessages_e errorOrLogMessages);
00409 #endif
00410 
00411     protected:
00412         virtual void _setError(const int /* ms_errs::err*/ errorNum,
00413             const char* strBuffer,
00414             const msg_sev severity,
00415             const std::string & sessionID = "",
00416             const int userID = -1,
00417             const int srcLineNumber = -1,
00418             const char * srcFileName = "") = 0;
00419 
00420     private:
00421         typedef std::pair<ms_loggingmonitor::Source_e, errorOrLogMessages_e> msgsSrcAndType_t;
00422         catalog_map_t& getGlobalCatalog() const;
00423         std::set<msgsSrcAndType_t>& getGlobalAddedToCatalog() const;
00424     }; // class ms_log
00425  // end of error_handling_group
00427 } // namespace matrix_science
00428 
00429 #ifndef SWIG
00430 #ifdef _INTERNAL_USE_AND_HAVE_BOOST_FORMAT
00431 #include "private/ms_log_impl.hpp"
00432 #endif
00433 #endif
00434 
00435 
00436 #endif // MS_LOG_HPP
00437 
00438 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:29