DGD Library
Version: 0.1.0.14 | Updated: Thu Aug 10 16:58:05 2006
Home
DGD News
FAQ
Code Documentation
DGD Installation Guide
Bugs-n-Features
DGD at Sourceforge.net
Download DGD
Subversion
Code Documentation
Documentation
Namespaces
Class Hierarchy
Class List
File List
Namespace Members
Functions
Globals
Tutorial
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

DGD::multifile_log Class Reference

An extension of funnel for producing fixed size log files. More...

#include <dgMultifileLog.h>

Inheritance diagram for DGD::multifile_log:

DGD::funnelDGD::funnelbuf::CallbackList of all members.

Public Member Functions

Static Public Attributes

Private Member Functions

  • void operator() (unsigned long line, unsigned long column, unsigned long bytes)
    This method overloads funnelbuf::Callback::operator() for tracking the actual size of the output information.

  • std::string real_name () const
    Calculate a current log file name.

Private Attributes


Detailed Description

An extension of funnel for producing fixed size log files.

DGD::multifile_log keeps internal std::ofstream object, it also keeps track of amount of information passed to the file. Upon certain condition, the current file is closed and a new file opened and all output of the funnel goes to the new file.

There are a different criteria for splitting the log file. DGD::multifile_log implements three of them:


Constructor & Destructor Documentation

DGD::multifile_log::multifile_log const char * name,
Split_criteriacriteria = &split_by_size
 

DGD::multifile_log constructor.

Parameters:
name base name of the log file.
criteria a pointer to criteria object. The class of the object must be derived from Split_criteria class.
See also:
multifile_log::real_name()

DGD::multifile_log::~multifile_log  ) 
 

multifile_log destructor.

Flushes and closes the log file.


Member Function Documentation

void DGD::multifile_log::operator() unsigned long line,
unsigned long column,
unsigned long bytes
[private, virtual]
 

This method overloads funnelbuf::Callback::operator() for tracking the actual size of the output information.

See also:
funnelbuf::Callback

Reimplemented from DGD::funnel.

std::string DGD::multifile_log::real_name  )  const [private]
 

Calculate a current log file name.

This method takes the base name given as a parameter to the constructor, the current part number and returns a file name of the current log file. The base name must be a string in form "prefix[.extension]", for example "debug.log" or "logfile". All file parts will be named "prefix#[.extension]" when # is a part number, for example for base name "debug.log" parts will be named "debug0.log", "debug1.log", etc... If the name has a number of '.' chars only the last one will be treated as extension beginning.


Member Data Documentation

multifile_log::Dont_split DGD::multifile_log::dont_split [static]
 

Instance of default Dont_split predicate.

multifile_log::Split_by_size DGD::multifile_log::split_by_size [static]
 

Instance of default Split_by_size predicate.

multifile_log::Split_by_lines DGD::multifile_log::split_by_lines [static]
 

Instance of default Split_by_size predicate.

std::ofstream DGD::multifile_log::m_file [private]
 

std::string DGD::multifile_log::m_name [private]
 

unsigned int DGD::multifile_log::m_part_count [private]
 

Split_criteria* DGD::multifile_log::m_split [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Aug 10 16:48:31 2006 for DGD Library by doxygen1.3

SourceForge.net Logo Powered by Mason Powered by Perl
Web design derived from Pasilda design found on www.oswd.org.
Copyright (c) 2002, 2003. Dimitry Kloper <kloper@users.sourceforge.net>