00001
00034
#ifndef _BPLOGGINGSTUB_H
00035
#define _BPLOGGINGSTUB_H
00036
00037
#include "BPLog.h"
00038
#include "InitCommand.h"
00039
#include <iostream>
00040
#include <fstream>
00041
00057 class BPLoggingStub:
00058
public virtual BPLog,
00059
public virtual PostORBInitCommand
00060 {
00061
00062
public:
00065
BPLoggingStub();
00066
00072
BPLoggingStub(
const char* filename);
00073
00076
virtual ~BPLoggingStub();
00077
00086
virtual
00087
void logSecurityAlarm(
const char* producerId,
const char* msg);
00088
00097
virtual
00098
void logFailureAlarm(
const char* producerId,
const char* msg);
00099
00110
virtual
00111
void logDegradedAlarm(
const char* producerId,
const char* msg);
00112
00122
virtual
00123
void logExceptionError(
const char* producerId,
const char* msg);
00124
00133
virtual
00134
void logFlowControlError(
const char* producerId,
const char* msg);
00135
00144
virtual
00145
void logRangeError(
const char* producerId,
const char* msg);
00146
00155
virtual
00156
void logUsageError(
const char* producerId,
const char* msg);
00157
00166
virtual
00167
void logAdministrativeEvent(
const char* producerId,
const char* msg);
00168
00177
virtual
00178
void logStatisticReport(
const char* producerId,
const char* msg);
00179
00192
virtual
00193
void logDebugReport(
const char* producerId,
00194
const char* msg,
00195
unsigned short debuglevel=10);
00196
00203
virtual bool execute(CORBA::ORB_ptr orb, ConfMap& config_map);
00204
00205
00206
private:
00207
00208 std::ostream out_log;
00209 std::filebuf out_buf;
00210
00211
void _write_msg(
const std::string msg);
00212
00213 };
00214
#endif