1/*
2 * Legal Notice
3 *
4 * This document and associated source code (the "Work") is a part of a
5 * benchmark specification maintained by the TPC.
6 *
7 * The TPC reserves all right, title, and interest to the Work as provided
8 * under U.S. and international laws, including without limitation all patent
9 * and trademark rights therein.
10 *
11 * No Warranty
12 *
13 * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
14 * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
15 * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
16 * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
17 * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
18 * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
19 * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
20 * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
21 * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
22 * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
23 * WITH REGARD TO THE WORK.
24 * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
25 * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
26 * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
27 * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
28 * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
29 * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
30 * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
31 * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
32 *
33 * Contributors
34 * - Matt Emmerton
35 */
36
37/******************************************************************************
38 * Description: This file implements the interface for data logging.
39 ******************************************************************************/
40
41#ifndef BASE_LOGGER_H
42#define BASE_LOGGER_H
43
44#include "utilities/EGenStandardTypes.h"
45#include "DriverTypes.h"
46#include "DriverParamSettings.h"
47#include "BaseLogFormatter.h"
48
49namespace TPCE {
50
51/********************************* Generic Logger Class
52 * ************************************/
53
54class CBaseLogger {
55private:
56 char m_Prefix[64];
57 CBaseLogFormatter *m_pLogFormatter;
58
59 bool SendToLogger(const char *szPrefix, const char *szMsg);
60
61protected:
62 CBaseLogger(eDriverType drvType, INT32 UniqueId, CBaseLogFormatter *pFormatter);
63 virtual bool SendToLoggerImpl(const char *szPrefix, const char *szTimestamp, const char *szMsg) = 0;
64
65public:
66 // Destructor
67 virtual ~CBaseLogger() {
68 }
69
70 // Strings
71 bool SendToLogger(const char *str);
72 bool SendToLogger(string str);
73
74 // Parameter Structures
75 bool SendToLogger(CLoaderSettings &parms);
76 bool SendToLogger(CDriverGlobalSettings &parms);
77 bool SendToLogger(CDriverCESettings &parms);
78 bool SendToLogger(CDriverCEPartitionSettings &parms);
79 bool SendToLogger(CDriverMEESettings &parms);
80 bool SendToLogger(CDriverDMSettings &parms);
81 bool SendToLogger(CBrokerVolumeSettings &parms);
82 bool SendToLogger(CCustomerPositionSettings &parms);
83 bool SendToLogger(CMarketWatchSettings &parms);
84 bool SendToLogger(CSecurityDetailSettings &parms);
85 bool SendToLogger(CTradeLookupSettings &parms);
86 bool SendToLogger(CTradeOrderSettings &parms);
87 bool SendToLogger(CTradeUpdateSettings &parms);
88 bool SendToLogger(CTxnMixGeneratorSettings &parms);
89 bool SendToLogger(TDriverCETxnSettings &parms);
90};
91
92} // namespace TPCE
93
94#endif // BASE_LOGGER_H
95