Loading...
Searching...
No Matches
StdOutLogger.h
Go to the documentation of this file.
// -*- c++ -*-
//------------------------------------------------------------------------------
// $Id: StdOutLogger.h,v 1.3 2003/07/25 02:51:47 vlg Exp $
//------------------------------------------------------------------------------
// StdOutLogger.h
//------------------------------------------------------------------------------
// Copyright (c) 2001 by Vladislav Grinchenko
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//------------------------------------------------------------------------------
// Created: 10/31/2001
//------------------------------------------------------------------------------
#ifndef STDOUT_LOGGER_H
#define STDOUT_LOGGER_H
#include <fstream>
#include <string>
#include <iostream>
#include "assa/Logger_Impl.h"
namespace ASSA {
class StdOutLogger : public Logger_Impl
{
public:
StdOutLogger () { /*empty*/ }
virtual int log_open (u_long groups_);
virtual int log_close (void);
virtual int log_msg (Group g_,
size_t indent_level_,
const string& func_name_,
size_t expected_sz_,
const char* fmt_, va_list);
virtual int log_func (Group g_,
size_t indent_level_,
const string& func_name_,
marker_t type_);
virtual void log_resync ();
private:
StdOutLogger (const StdOutLogger&);
StdOutLogger& operator= (const StdOutLogger&);
};
/*******************************************************************************
Inline member functions
*******************************************************************************/
inline int
StdOutLogger::
log_open (u_long groups_)
{
m_groups = groups_;
return 0;
}
inline int
StdOutLogger::
log_close (void)
{
return 0;
}
inline void
StdOutLogger::
log_resync ()
{
std::cout << std::flush;
}
} // end namespace ASSA
#endif /* STDERR_LOGGER_H */
Logger_Impl.h
u_long
unsigned long u_long
Definition Logger_Impl.h:41
ASSA::AutoPtrRef
A wrapper class to provide AutoPtr with reference semantics.
Definition AutoPtr.h:32
ASSA::Logger_Impl
Definition Logger_Impl.h:141
ASSA::Logger_Impl::m_groups
u_long m_groups
Enabled groups.
Definition Logger_Impl.h:239
ASSA::StdOutLogger
Definition StdOutLogger.h:33
ASSA::StdOutLogger::StdOutLogger
StdOutLogger(const StdOutLogger &)
ASSA::StdOutLogger::log_open
virtual int log_open(u_long groups_)
Open StdErr Logger.
Definition StdOutLogger.h:62
ASSA::StdOutLogger::StdOutLogger
StdOutLogger()
Definition StdOutLogger.h:35
ASSA::StdOutLogger::log_msg
virtual int log_msg(Group g_, size_t indent_level_, const string &func_name_, size_t expected_sz_, const char *fmt_, va_list)
Definition StdOutLogger.cpp:28
ASSA::StdOutLogger::log_func
virtual int log_func(Group g_, size_t indent_level_, const string &func_name_, marker_t type_)
Definition StdOutLogger.cpp:60
ASSA::StdOutLogger::operator=
StdOutLogger & operator=(const StdOutLogger &)
no cloning
ASSA::StdOutLogger::log_close
virtual int log_close(void)
Definition StdOutLogger.h:70
ASSA::StdOutLogger::log_resync
virtual void log_resync()
Definition StdOutLogger.h:77
ASSA
Definition Acceptor.h:40
ASSA::marker_t
marker_t
Definition LogMask.h:67
ASSA::Group
Group
Definition LogMask.h:25