logger.h
// Copyright (c) 2002 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_LOGGER_H
#define RUDIMENTS_LOGGER_H
#include <rudiments/private/loggerincludes.h>
class RUDIMENTS_DLLSPEC logdestination {
#include <rudiments/private/logdestination.h>
};
class syslogdestinationprivate;
class RUDIMENTS_DLLSPEC syslogdestination : public logdestination {
public:
syslogdestination();
syslogdestination(const syslogdestination &f);
syslogdestination &operator=(const syslogdestination &f);
virtual ~syslogdestination();
void open(const char *ident, int32_t option,
int32_t facility, int32_t priority);
void close();
#include <rudiments/private/syslogdestination.h>
};
class filedestinationprivate;
class RUDIMENTS_DLLSPEC filedestination : public logdestination {
public:
filedestination();
filedestination(const filedestination &f);
filedestination &operator=(const filedestination &f);
virtual ~filedestination();
bool open(const char *filename, mode_t perms);
void close();
#include <rudiments/private/filedestination.h>
};
class RUDIMENTS_DLLSPEC stdoutdestination : public logdestination {
#include <rudiments/private/stdoutdestination.h>
};
class RUDIMENTS_DLLSPEC stderrdestination : public logdestination {
#include <rudiments/private/stderrdestination.h>
};
typedef linkedlistnode<logdestination *> loggerlistnode;
typedef linkedlist<logdestination *> loggerlist;
class loggerprivate;
class RUDIMENTS_DLLSPEC logger {
public:
logger();
~logger();
void addLogDestination(logdestination *logdest);
void removeLogDestination(logdestination *logdest);
void removeAllLogDestinations();
static char *logHeader(const char *name);
void write(const char *header, int32_t tabs,
const char *string);
void write(const char *header, int32_t tabs, char character);
void write(const char *header, int32_t tabs, int32_t number);
void write(const char *header, int32_t tabs, double number);
#include <rudiments/private/logger.h>
};
#endif
character
Definition: character.h:11
linkedlist
Definition: linkedlist.h:60
stdoutdestination
Definition: logger.h:78
logdestination
Definition: logger.h:11
logger
Definition: logger.h:103
linkedlistnode
Definition: linkedlist.h:11
syslogdestination
Definition: logger.h:18
stderrdestination
Definition: logger.h:84
filedestination
Definition: logger.h:50