#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 ) |
#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 ) |
Definition at line 108 of file glog.h.
Referenced by Main::Run::onException(), GNet::Server::onException(), GSmtp::VerifierStatus::parse(), Main::Run::run(), and G::Root::~Root().
#define G_LOG | ( | expr | ) | G_LOG_OUTPUT( expr , G::Log::s_LogVerbose ) |
Definition at line 98 of file glog.h.
Referenced by GPop::ServerProtocol::apply(), GSmtp::ServerProtocol::apply(), GSmtp::ClientProtocol::apply(), GSmtp::StoredFile::destroy(), GSmtp::FileStore::get(), GSmtp::StoredFile::lock(), GSmtp::NewFile::NewFile(), GSmtp::Client::onDelete(), Main::Run::run(), GSmtp::ClientProtocol::sendDone(), GAuth::SaslServerBasicImp::trustedCore(), and GSmtp::StoredFile::unfail().
#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.
#define G_LOG_S | ( | expr | ) | G_LOG_OUTPUT( expr , G::Log::s_LogSummary ) |
Definition at line 103 of file glog.h.
Referenced by GSmtp::AdminServerPeer::AdminServerPeer(), GSmtp::StoredFile::fail(), GPop::ServerPeer::onDelete(), GSmtp::ServerPeer::onDelete(), GSmtp::AdminServerPeer::onDelete(), GPop::Server::report(), GPop::ServerPeer::ServerPeer(), GSmtp::ServerPeer::ServerPeer(), and GNet::MultiServer::serverReport().
#define G_WARNING | ( | expr | ) | G_LOG_OUTPUT( expr , G::Log::s_Warning ) |
Definition at line 107 of file glog.h.
Referenced by GSmtp::ProtocolMessageStore::addTo(), GAuth::SaslServerBasic::apply(), GAuth::SaslServerPamImp::apply(), GNet::Socket::bind(), GNet::SimpleClient::connect(), GNet::EventLoop::EventLoop(), Main::CommandLineImp::logSemanticWarnings(), GPop::Server::newPeer(), GSmtp::Server::newPeer(), GSmtp::AdminServer::newPeer(), GSmtp::FileIterator::next(), GSmtp::RequestClient::onDeleteImp(), GSmtp::SpamClient::onDeleteImp(), GNet::HeapClient::onException(), GSmtp::ServerProtocol::onTimeout(), GSmtp::ClientProtocol::onTimeout(), GNet::Socket::prepare(), GAuth::SaslClient::response(), GSmtp::ProtocolMessageStore::setFrom(), GSmtp::StoredFile::unfail(), GNet::Socket::write(), and GNet::ServerPeer::writeEvent().