mirror hosted by tehsausage.com
PTypes: streams: logfile

C++ Portable Types Library (PTypes) Version 2.1


Top: Streams: logfile

#include <pstreams.h>

class logfile: outfile {
    logfile( [ const string& filename, bool append = true ] );
    void putf(const char* fmt, ...);
}

The lofgile class inherits all public methods and properties from outfile, but differs in the following:

logfile::logfile( [ const string& filename, bool append = true ] ) creates an output file stream, but does not open the file. When opening a file with open(), the file pointer is positioned at the end of the file, unless append is set to false. Filename and append parameters are optional.

void logfile::putf(const char* fmt, ...) is a thread-safe version of outstm::putf().

See also: iobase, outstm, outfile, Examples


PTypes home