Anope IRC Services  Version 2.0
Public Member Functions | Data Fields | Private Member Functions
Log Class Reference

#include <logger.h>

Collaboration diagram for Log:
Collaboration graph
[legend]

Public Member Functions

 Log (LogType type=LOG_NORMAL, const Anope::string &category="", BotInfo *bi=NULL)
 
 Log (LogType type, CommandSource &source, Command *c, ChannelInfo *ci=NULL)
 
 Log (User *u, Channel *c, const Anope::string &category="")
 
 Log (User *u, const Anope::string &category="", BotInfo *bi=NULL)
 
 Log (Server *s, const Anope::string &category="", BotInfo *bi=NULL)
 
 Log (BotInfo *b, const Anope::string &category="")
 
 Log (Module *m, const Anope::string &category="", BotInfo *bi=NULL)
 
 ~Log ()
 
Anope::string BuildPrefix () const
 
template<typename T >
Logoperator<< (T val)
 

Data Fields

BotInfobi
 
Useru
 
NickCorenc
 
Commandc
 
CommandSourcesource
 
Channelchan
 
const ChannelInfoci
 
Servers
 
Modulem
 
LogType type
 
Anope::string category
 
std::stringstream buf
 

Private Member Functions

Anope::string FormatSource () const
 
Anope::string FormatCommand () const
 

Detailed Description

Definition at line 53 of file logger.h.

Constructor & Destructor Documentation

Log::Log ( LogType  type = LOG_NORMAL,
const Anope::string category = "",
BotInfo bi = NULL 
)

Definition at line 78 of file logger.cpp.

Log::Log ( LogType  type,
CommandSource source,
Command c,
ChannelInfo ci = NULL 
)
Log::Log ( User u,
Channel c,
const Anope::string category = "" 
)

Definition at line 97 of file logger.cpp.

References chan.

Log::Log ( User u,
const Anope::string category = "",
BotInfo bi = NULL 
)

Definition at line 103 of file logger.cpp.

References u.

Log::Log ( Server s,
const Anope::string category = "",
BotInfo bi = NULL 
)

Definition at line 109 of file logger.cpp.

References s.

Log::Log ( BotInfo b,
const Anope::string category = "" 
)

Definition at line 115 of file logger.cpp.

Log::Log ( Module m,
const Anope::string category = "",
BotInfo bi = NULL 
)

Definition at line 119 of file logger.cpp.

Log::~Log ( )

Member Function Documentation

Anope::string Log::BuildPrefix ( ) const
Anope::string Log::FormatCommand ( ) const
private

Definition at line 152 of file logger.cpp.

References c, CommandSource::command, Anope::string::empty(), FormatSource(), Service::name, and source.

Referenced by BuildPrefix().

Anope::string Log::FormatSource ( ) const
private

Definition at line 140 of file logger.cpp.

References NickCore::display, User::GetMask(), nc, and u.

Referenced by BuildPrefix(), and FormatCommand().

template<typename T >
Log& Log::operator<< ( val)
inline

Definition at line 106 of file logger.h.

Field Documentation

BotInfo* Log::bi

Definition at line 57 of file logger.h.

Referenced by Log(), and LogInfo::ProcessMessage().

std::stringstream Log::buf

Definition at line 77 of file logger.h.

Referenced by LogInfo::ProcessMessage(), and ~Log().

Command* Log::c

Definition at line 63 of file logger.h.

Referenced by BuildPrefix(), FormatCommand(), and Log().

Anope::string Log::category

Definition at line 75 of file logger.h.

Referenced by BuildPrefix(), and Log().

Channel* Log::chan

Definition at line 67 of file logger.h.

Referenced by BuildPrefix(), and Log().

const ChannelInfo* Log::ci
Module* Log::m

Definition at line 73 of file logger.h.

Referenced by BuildPrefix(), and LogInfo::ProcessMessage().

NickCore* Log::nc

Definition at line 61 of file logger.h.

Referenced by FormatSource(), NSCert::OnNickValidate(), and LogInfo::ProcessMessage().

Server* Log::s

Definition at line 71 of file logger.h.

Referenced by BuildPrefix(), Log(), and LogInfo::ProcessMessage().

CommandSource* Log::source

Definition at line 65 of file logger.h.

Referenced by FormatCommand().

LogType Log::type

Definition at line 74 of file logger.h.

Referenced by BuildPrefix(), Log(), MyManager::Process(), LogInfo::ProcessMessage(), and ~Log().

User* Log::u

Definition at line 59 of file logger.h.

Referenced by BuildPrefix(), FormatSource(), Log(), and LogInfo::ProcessMessage().


The documentation for this class was generated from the following files: