00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CEYLAN_LOG_AGGREGATOR_HTML_H_
00028 #define CEYLAN_LOG_AGGREGATOR_HTML_H_
00029
00030
00031 #include "CeylanLog.h"
00032 #include "CeylanLogAggregator.h"
00033
00034
00035 #include <string>
00036
00037
00038 namespace Ceylan
00039 {
00040
00041
00042 namespace System
00043 {
00044
00045
00046 class Directory ;
00047
00048
00049 class File ;
00050
00051 }
00052
00053
00054 namespace Log
00055 {
00056
00057
00078 class CEYLAN_DLL LogAggregatorHTML: public LogAggregator
00079 {
00080
00081
00082 public:
00083
00084
00107 explicit LogAggregatorHTML(
00108 const std::string & callerDescription,
00109 const std::string & logDirectoryName,
00110 bool useGlobalLevelOfDetail = true, bool beSmart = true ) ;
00111
00112
00113
00115 virtual ~LogAggregatorHTML() throw() ;
00116
00117
00118
00130 virtual void aggregate() ;
00131
00132
00133
00148 virtual void store( LogMessage & message ) ;
00149
00150
00151
00163 virtual const std::string toString(
00164 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00165
00166
00167
00168
00169
00170
00171
00173 static const LevelOfDetail DefaultGlobalLevelOfDetail ;
00174
00175
00176
00182 static const std::string HTMLPageSuffix ;
00183
00184
00185
00186
00187 protected:
00188
00189
00190
00191
00192
00193
00203 virtual void write( const LogChannel & channel ) const ;
00204
00205
00206
00219 virtual void write( const LogMessage & message,
00220 System::File & targetFile ) const ;
00221
00222
00223
00234 static void WriteChannelHeader( const LogChannel & channel,
00235 System::File & targetFile ) ;
00236
00237
00238
00251 static void WriteChannelFooter( const LogChannel & channel,
00252 System::File & targetFile ) ;
00253
00254
00255
00261 std::string _callerDescription ;
00262
00263
00269 std::string _logDirectoryName ;
00270
00271
00273 System::Directory * _outputDirectory ;
00274
00275
00283 bool _useGlobalLevelOfDetail ;
00284
00285
00291 LevelOfDetail _globalLevelOfDetail ;
00292
00293
00295 static const std::string FrameSet ;
00296
00297
00299 static const std::string DefaultPageHeader ;
00300
00302 static const std::string DefaultPageFooter ;
00303
00304
00306 static const std::string MenuHeader ;
00307
00309 static const std::string MenuFooter ;
00310
00311
00313 static const std::string ChannelHeader ;
00314
00316 static const std::string ChannelFooter ;
00317
00318
00319
00320 private:
00321
00322
00331 LogAggregatorHTML( const LogAggregatorHTML & source ) ;
00332
00333
00342 LogAggregatorHTML & operator = (
00343 const LogAggregatorHTML & source ) ;
00344
00345
00346 } ;
00347
00348
00349 }
00350
00351
00352 }
00353
00354
00355 #endif // CEYLAN_LOG_AGGREGATOR_HTML_H_
00356