Classes | Namespaces | Macros
glog.h File Reference
#include "gdef.h"
#include <sstream>
#include <string>

Go to the source code of this file.

Classes

class  G::Log
 A static class for doing iostream-based logging. More...
 
class  G::Log::Line
 A class for adding line number information to the Log output. More...
 

Namespaces

 G
 Low-level classes.
 

Macros

#define G_LOG_OUTPUT(expr, severity)   do { G::Log(severity,__FILE__,__LINE__) << expr ; } while(0)
 Macros: G_LOG, G_LOG_S, G_DEBUG, G_WARNING, G_ERROR The debug macro is for debugging during development. More...
 
#define G_DEBUG(expr)
 
#define G_LOG(expr)   G_LOG_OUTPUT( expr , G::Log::s_LogVerbose )
 
#define G_LOG_S(expr)   G_LOG_OUTPUT( expr , G::Log::s_LogSummary )
 
#define G_WARNING(expr)   G_LOG_OUTPUT( expr , G::Log::s_Warning )
 
#define G_ERROR(expr)   G_LOG_OUTPUT( expr , G::Log::s_Error )
 

Macro Definition Documentation

#define G_DEBUG (   expr)

Definition at line 95 of file glog.h.

Referenced by GNet::StreamSocket::accept(), GNet::EventHandlerList::add(), GNet::Socket::addExceptionHandler(), GNet::Socket::addReadHandler(), GSmtp::ProtocolMessageStore::addReceived(), GSmtp::ProtocolMessageStore::addTo(), GNet::Socket::addWriteHandler(), GAuth::SaslServerBasic::apply(), G::Pam::authenticate(), GNet::Socket::bind(), G::Pam::checkAccount(), GSmtp::ProtocolMessageStore::clear(), GAuth::SaslClientImp::clientResponse(), G::Pam::closeSession(), GNet::Socket::connect(), GNet::SimpleClient::connect(), GNet::Local::domainname(), GNet::TimerList::doTimeouts(), G::Pam::Error::Error(), G::Pam::establishCredentials(), GPop::StoreLock::get(), GAuth::SecretsFile::id(), GPop::AuthImp::init(), GAuth::SaslServerBasic::init(), GNet::Server::init(), G::File::mkdirs(), GSmtp::NetworkVerifier::NetworkVerifier(), GSmtp::AdminServer::notify(), GSmtp::RequestClient::onConnect(), GSmtp::SpamClient::onConnect(), GNet::ResolverImp::onData(), GSmtp::Client::onDelete(), GNet::ServerPeer::onException(), GSmtp::RequestClient::onReceive(), GSmtp::Client::onReceive(), GSmtp::ServerProtocol::onTimeoutException(), GSmtp::StoredFile::openContent(), G::Pam::openSession(), GAuth::PamImp::PamImp(), G::PamImp::PamImp(), GSmtp::FactoryParser::parse(), G::Pipe::Pipe(), GAuth::SaslClient::preferred(), GSmtp::ProtocolMessageStore::process(), GSmtp::ProtocolMessageForward::processDone(), GNet::StreamSocket::read(), GNet::EventHandler::readEvent(), GNet::SocketProtocolImp::readEvent(), GNet::Server::readEvent(), GNet::Socket::reason(), G::File::remove(), GNet::EventHandlerList::remove(), G::File::rename(), GSmtp::RequestClient::request(), GSmtp::SpamClient::request(), GSmtp::RequestClient::RequestClient(), GSmtp::ProtocolMessageStore::reset(), GPop::ServerProtocol::resume(), GAuth::SaslClient::SaslClient(), GAuth::SecretsFile::SecretsFile(), GPop::ServerPeer::securityEnabled(), GNet::ServerPeer::ServerPeer(), GSmtp::ProtocolMessageStore::setFrom(), GNet::SimpleClient::SimpleClient(), GNet::Socket::Socket(), GSmtp::SpamClient::SpamClient(), GNet::SocketProtocolImp::sslAccept(), GNet::SocketProtocolImp::sslConnect(), GSmtp::ClientProtocol::start(), GSmtp::StoredFile::StoredFile(), GAuth::SaslServerBasicImp::trusted(), GAuth::SaslServerBasic::trusted(), GAuth::SaslServerBasicImp::trustedCore(), GSmtp::StoredFile::unfail(), GSmtp::FileStore::unfailAll(), GSmtp::AdminServer::unregister(), GNet::TimerList::update(), GSmtp::FileStore::updated(), GNet::SimpleClient::updateResolverInfo(), GAuth::SaslServerBasicImp::validate(), GSmtp::ExecutableVerifier::verify(), GNet::Socket::write(), GNet::DatagramSocket::write(), GNet::EventHandler::writeEvent(), GNet::SocketProtocolImp::writeEvent(), GNet::Server::writeEvent(), GNet::SimpleClient::writeEvent(), GSmtp::NewFile::~NewFile(), G::PamImp::~PamImp(), and GNet::ServerPeer::~ServerPeer().

#define G_ERROR (   expr)    G_LOG_OUTPUT( expr , G::Log::s_Error )
#define G_LOG (   expr)    G_LOG_OUTPUT( expr , G::Log::s_LogVerbose )
#define G_LOG_OUTPUT (   expr,
  severity 
)    do { G::Log(severity,__FILE__,__LINE__) << expr ; } while(0)

Macros: G_LOG, G_LOG_S, G_DEBUG, G_WARNING, G_ERROR The debug macro is for debugging during development.

The log macro is used for progress logging, typically in long-lived server processes. The warning and error macros are used for error warning/error messages. In programs where logging can be disabled completely (see LogOutput) then warning/error messages should also get raised by some another independent means.

Definition at line 91 of file glog.h.

#define G_LOG_S (   expr)    G_LOG_OUTPUT( expr , G::Log::s_LogSummary )
#define G_WARNING (   expr)    G_LOG_OUTPUT( expr , G::Log::s_Warning )