NAME

OTC_LogBuf - Streambuf class for use by OTC_LogStream.

SYNOPSIS


#include <OTC/debug/logbuf.hh>

class OTC_LogBuf : public streambuf
{
  public:
    ~OTC_LogBuf();
    OTC_LogBuf(char* theBuffer, int theSize);
    inline OTC_LogLevel setLevel(OTC_LogLevel theLevel);
    int sync();
  protected:
    streambuf* setbuf(char* theBuffer, int theSize);
    int overflow(int c);
    int underflow();
};

CLASS TYPE

Concrete

DESCRIPTION

OTC_LogBuf is used to used to manage the buffer used by OTC_LogStream, to format messages which are to be sent to the logger. Messages are automatically sent to the logger at the set priority level, when the stream using this class is flushed, or the buffer used in this class is filled.

INITIALISATION

OTC_LogBuf(char* theBuffer, int theSize);

LOG LEVEL

inline OTC_LogLevel setLevel(OTC_LogLevel theLevel);

STREAM FLUSHING

int sync();

SEE ALSO

OTC_Logger, OTC_LogStream

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED