OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Sandesh Class Referenceabstract

#include <sandesh.h>

Inheritance diagram for Sandesh:
Collaboration diagram for Sandesh:

Classes

struct  SandeshRole
 

Public Types

typedef WorkQueue
< SandeshRequest * > 
SandeshRxQueue
 
typedef WorkQueue< SandeshElementSandeshQueue
 
typedef WorkQueue
< boost::shared_ptr
< contrail::sandesh::transport::TMemoryBuffer > > 
SandeshBufferQueue
 
typedef
boost::asio::ip::tcp::endpoint 
Endpoint
 
typedef boost::function< void(Sandesh *)> SandeshCallback
 
typedef boost::tuple< size_t,
SandeshLevel::type, bool, bool > 
QueueWaterMarkInfo
 
typedef std::map< std::string,
std::map< std::string,
std::string > > 
DerivedStats
 

Public Member Functions

virtual size_t GetSize () const =0
 
virtual void Release ()
 
virtual void Log () const =0
 
virtual void ForcedLog () const =0
 
virtual std::string ToString () const =0
 
virtual std::string ModuleName () const =0
 
virtual int32_t Read (boost::shared_ptr< contrail::sandesh::protocol::TProtocol > iprot)=0
 
virtual int32_t Write (boost::shared_ptr< contrail::sandesh::protocol::TProtocol > oprot) const =0
 
virtual const uint32_t seqnum ()
 
virtual const int32_t versionsig () const =0
 
virtual const char * Name () const
 
bool Enqueue (SandeshQueue *queue)
 
virtual int32_t WriteBinary (u_int8_t *buf, u_int32_t buf_len, int *error)
 
virtual int32_t ReadBinary (u_int8_t *buf, u_int32_t buf_len, int *error)
 
virtual int32_t WriteBinaryToFile (const std::string &path, int *error)
 
virtual int32_t ReadBinaryFromFile (const std::string &path, int *error)
 
bool IsLoggingAllowed () const
 
time_t timestamp () const
 
void set_context (std::string context)
 
std::string context () const
 
void set_scope (std::string scope)
 
std::string scope () const
 
SandeshType::type type () const
 
void set_hints (int32_t hints)
 
int32_t hints () const
 
void set_level (SandeshLevel::type level)
 
SandeshLevel::type level () const
 
void set_category (std::string category)
 
std::string category () const
 

Static Public Member Functions

static bool InitGenerator (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, const std::vector< std::string > &collectors, SandeshContext *client_context=NULL, DerivedStats ds=DerivedStats(), const SandeshConfig &config=SandeshConfig())
 
static bool InitGenerator (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, DerivedStats ds=DerivedStats(), const SandeshConfig &config=SandeshConfig())
 
static void RecordPort (const std::string &name, const std::string &module, unsigned short port)
 
static bool InitCollector (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, const std::string &collector_ip, int collector_port, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig())
 
static bool InitGeneratorTest (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig())
 
static bool ConnectToCollector (const std::string &collector_ip, int collector_port, bool periodicuve=false)
 
static void ReConfigCollectors (const std::vector< std::string > &collector_list)
 
static void Uninit ()
 
static void SetDscpValue (uint8_t value)
 
static void DisableFlowCollection (bool disable)
 
static bool IsFlowCollectionDisabled ()
 
static void DisableSendingAllMessages (bool disable)
 
static bool IsSendingAllMessagesDisabled ()
 
static void DisableSendingObjectLogs (bool disable)
 
static bool IsSendingObjectLogsDisabled ()
 
static bool IsSendingSystemLogsDisabled ()
 
static void DisableSendingFlows (bool disable)
 
static bool IsSendingFlowsDisabled ()
 
static void set_send_rate_limit (int rate_limit)
 
static uint32_t get_send_rate_limit ()
 
static void SetLoggingParams (bool enable_local_log, std::string category, std::string level, bool enable_trace_print=false, bool enable_flow_log=false, bool enable_session_syslog=false)
 
static void SetLoggingParams (bool enable_local_log, std::string category, SandeshLevel::type level, bool enable_trace_print=false, bool enable_flow_log=false)
 
static void SetLoggingLevel (std::string level)
 
static void SetLoggingLevel (SandeshLevel::type level)
 
static SandeshLevel::type LoggingLevel ()
 
static SandeshLevel::type LoggingUtLevel ()
 
static bool IsLocalLoggingEnabled ()
 
static void SetLocalLogging (bool enable)
 
static bool IsFlowLoggingEnabled ()
 
static bool IsSloSyslogEnabled ()
 
static void SetFlowLogging (bool enable)
 
static void SetSessionSyslogging (bool enable_session_syslog)
 
static bool IsTracePrintEnabled ()
 
static void SetTracePrint (bool enable)
 
static void SetLoggingCategory (std::string category)
 
static std::string LoggingCategory ()
 
static void SetSendQueue (bool enable)
 
static bool IsSendQueueEnabled ()
 
static bool IsConnectToCollectorEnabled ()
 
static SandeshLevel::type SendingLevel ()
 
static int32_t ReceiveBinaryMsgOne (u_int8_t *buf, u_int32_t buf_len, int *error, SandeshContext *client_context)
 
static int32_t ReceiveBinaryMsg (u_int8_t *buf, u_int32_t buf_len, int *error, SandeshContext *client_context)
 
static bool SendReady (SandeshConnection *sconn=NULL)
 
static void UpdateRxMsgStats (const std::string &msg_name, uint64_t bytes)
 
static void UpdateRxMsgFailStats (const std::string &msg_name, uint64_t bytes, SandeshRxDropReason::type dreason)
 
static void UpdateTxMsgStats (const std::string &msg_name, uint64_t bytes)
 
static void UpdateTxMsgFailStats (const std::string &msg_name, uint64_t bytes, SandeshTxDropReason::type dreason)
 
static void GetMsgStats (std::vector< SandeshMessageTypeStats > *mtype_stats, SandeshMessageStats *magg_stats)
 
static void GetMsgStats (boost::ptr_map< std::string, SandeshMessageTypeStats > *mtype_stats, SandeshMessageStats *magg_stats)
 
static const char * SandeshRoleToString (SandeshRole::type role)
 
static bool IsLoggingDroppedAllowed (SandeshType::type)
 
static void set_source (std::string &source)
 
static std::string source ()
 
static void set_module (std::string &module)
 
static std::string module ()
 
static void set_instance_id (std::string &instance_id)
 
static std::string instance_id ()
 
static void set_node_type (std::string &node_type)
 
static std::string node_type ()
 
static SandeshRole::type role ()
 
static int http_port ()
 
static SandeshRxQueuerecv_queue ()
 
static SandeshContextclient_context ()
 
static void set_client_context (SandeshContext *context)
 
static SandeshContextmodule_context (const std::string &module_name)
 
static void set_module_context (const std::string &module_name, SandeshContext *context)
 
static void set_response_callback (SandeshCallback response_cb)
 
static SandeshCallback response_callback ()
 
static SandeshClientclient ()
 
static SandeshConfigconfig ()
 
static const char * LevelToString (SandeshLevel::type level)
 
static SandeshLevel::type StringToLevel (std::string level)
 
static log4cplus::Logger & logger ()
 
static log4cplus::Logger & slo_logger ()
 
static log4cplus::Logger & sampled_logger ()
 
static void set_logger_appender (const std::string &file_name, long max_file_size, int max_backup_index, const std::string &syslog_facility, const std::vector< std::string > &destn, const std::string &ident, bool is_sampled_logger)
 
static void set_send_to_collector_flags (const std::vector< std::string > &sampled_destination, const std::vector< std::string > &slo_destination)
 
static bool is_send_slo_to_collector_enabled ()
 
static bool is_send_sampled_to_collector_enabled ()
 
static bool is_send_slo_to_logger_enabled ()
 
static bool is_send_sampled_to_logger_enabled ()
 

Protected Member Functions

void set_timestamp (time_t timestamp)
 
void set_type (SandeshType::type type)
 
void set_name (const char *name)
 
 Sandesh (SandeshType::type type, const std::string &name, uint32_t seqno)
 
 Sandesh (SandeshType::type type, const std::string &name, uint32_t seqno, bool no_time_stamp)
 
virtual ~Sandesh ()
 
virtual bool Dispatch (SandeshConnection *sconn=NULL)
 
virtual bool SendEnqueue ()
 

Static Protected Member Functions

static bool HandleTest (SandeshLevel::type level, const std::string &category)
 
static bool IsUnitTest ()
 
static bool IsLevelUT (SandeshLevel::type level)
 
static bool IsLevelCategoryLoggingAllowed (SandeshType::type type, SandeshLevel::type level, const std::string &category)
 

Static Protected Attributes

static SandeshCallback response_callback_ = 0
 
static SandeshClientclient_ = NULL
 

Private Types

typedef std::map< std::string,
SandeshContext * > 
ModuleContextMap
 

Static Private Member Functions

static void InitReceive (int recv_task_inst=-1)
 
static void InitClient (EventManager *evm, Endpoint server, const SandeshConfig &config, bool periodicuve)
 
static bool InitClient (EventManager *evm, const std::vector< std::string > &collectors, const SandeshConfig &config)
 
static bool ProcessRecv (SandeshRequest *)
 
static bool Initialize (SandeshRole::type role, const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig())
 

Private Attributes

const uint32_t seqnum_
 
std::string context_
 
time_t timestamp_
 
std::string scope_
 
SandeshType::type type_
 
int32_t hints_
 
SandeshLevel::type level_
 
std::string category_
 
std::string name_
 

Static Private Attributes

static SandeshRole::type role_ = SandeshRole::Invalid
 
static std::string module_
 
static std::string source_
 
static std::string node_type_
 
static std::string instance_id_
 
static int http_port_ = 0
 
static std::unique_ptr
< SandeshRxQueue
recv_queue_
 
static int recv_task_id_ = -1
 
static SandeshContextclient_context_ = NULL
 
static ModuleContextMap module_context_
 
static bool enable_local_log_ = false
 
static bool enable_flow_log_ = false
 
static bool enable_session_syslog_ = false
 
static SandeshLevel::type logging_level_ = SandeshLevel::INVALID
 
static SandeshLevel::type logging_ut_level_
 
static std::string logging_category_
 
static bool enable_trace_print_ = false
 
static bool connect_to_collector_ = false
 
static EventManagerevent_manager_ = NULL
 
static bool send_queue_enabled_ = true
 
static SandeshMessageStatistics msg_stats_
 
static tbb::mutex stats_mutex_
 
static log4cplus::Logger logger_
 
static log4cplus::Logger slo_logger_
 
static log4cplus::Logger sampled_logger_
 
static bool disable_flow_collection_ = false
 
static SandeshConfig config_
 
static bool disable_sending_all_ = false
 
static bool disable_sending_object_logs_ = false
 
static bool disable_sending_flows_ = false
 
static tbb::atomic< uint32_t > sandesh_send_ratelimit_
 
static bool slo_to_collector_ = false
 
static bool sampled_to_collector_ = false
 
static bool slo_to_logger_ = false
 
static bool sampled_to_logger_ = false
 

Friends

class SandeshTracePerfTest
 

Detailed Description

Definition at line 130 of file p/sandesh.h.

Member Typedef Documentation

typedef std::map<std::string, std::map<std::string,std::string> > Sandesh::DerivedStats

Definition at line 148 of file p/sandesh.h.

typedef boost::asio::ip::tcp::endpoint Sandesh::Endpoint

Definition at line 137 of file p/sandesh.h.

typedef std::map<std::string, SandeshContext *> Sandesh::ModuleContextMap
private

Definition at line 388 of file p/sandesh.h.

typedef boost::tuple<size_t, SandeshLevel::type, bool, bool> Sandesh::QueueWaterMarkInfo

Definition at line 147 of file p/sandesh.h.

Definition at line 136 of file p/sandesh.h.

typedef boost::function<void (Sandesh *)> Sandesh::SandeshCallback

Definition at line 138 of file p/sandesh.h.

Definition at line 133 of file p/sandesh.h.

Definition at line 132 of file p/sandesh.h.

Constructor & Destructor Documentation

Sandesh::Sandesh ( SandeshType::type  type,
const std::string &  name,
uint32_t  seqno 
)
inlineprotected

Definition at line 346 of file p/sandesh.h.

Sandesh::Sandesh ( SandeshType::type  type,
const std::string &  name,
uint32_t  seqno,
bool  no_time_stamp 
)
inlineprotected

Definition at line 357 of file p/sandesh.h.

Here is the call graph for this function:

virtual Sandesh::~Sandesh ( )
inlineprotectedvirtual

Definition at line 368 of file p/sandesh.h.

Member Function Documentation

std::string Sandesh::category ( ) const
inline

Definition at line 320 of file p/sandesh.h.

static SandeshClient* Sandesh::client ( )
inlinestatic

Definition at line 306 of file p/sandesh.h.

static SandeshContext* Sandesh::client_context ( )
inlinestatic

Definition at line 299 of file p/sandesh.h.

static SandeshConfig& Sandesh::config ( )
inlinestatic

Definition at line 307 of file p/sandesh.h.

bool Sandesh::ConnectToCollector ( const std::string &  collector_ip,
int  collector_port,
bool  periodicuve = false 
)
static

Definition at line 212 of file sandesh.cc.

Here is the call graph for this function:

std::string Sandesh::context ( ) const
inline

Definition at line 311 of file p/sandesh.h.

void Sandesh::DisableFlowCollection ( bool  disable)
static

Definition at line 484 of file sandesh.cc.

void Sandesh::DisableSendingAllMessages ( bool  disable)
static

Definition at line 492 of file sandesh.cc.

void Sandesh::DisableSendingFlows ( bool  disable)
static

Definition at line 516 of file sandesh.cc.

void Sandesh::DisableSendingObjectLogs ( bool  disable)
static

Definition at line 504 of file sandesh.cc.

bool Sandesh::Dispatch ( SandeshConnection sconn = NULL)
protectedvirtual

Reimplemented in SandeshUVE, SandeshTrace, and SandeshResponse.

Definition at line 727 of file sandesh.cc.

Here is the call graph for this function:

bool Sandesh::Enqueue ( SandeshQueue queue)

Definition at line 544 of file sandesh.cc.

Here is the call graph for this function:

virtual void Sandesh::ForcedLog ( ) const
pure virtual
uint32_t Sandesh::get_send_rate_limit ( )
static

Definition at line 540 of file sandesh.cc.

void Sandesh::GetMsgStats ( std::vector< SandeshMessageTypeStats > *  mtype_stats,
SandeshMessageStats *  magg_stats 
)
static

Definition at line 896 of file sandesh.cc.

void Sandesh::GetMsgStats ( boost::ptr_map< std::string, SandeshMessageTypeStats > *  mtype_stats,
SandeshMessageStats *  magg_stats 
)
static

Definition at line 903 of file sandesh.cc.

virtual size_t Sandesh::GetSize ( ) const
pure virtual
bool Sandesh::HandleTest ( SandeshLevel::type  level,
const std::string &  category 
)
staticprotected

Definition at line 966 of file sandesh.cc.

int32_t Sandesh::hints ( ) const
inline

Definition at line 316 of file p/sandesh.h.

static int Sandesh::http_port ( )
inlinestatic

Definition at line 297 of file p/sandesh.h.

void Sandesh::InitClient ( EventManager evm,
Endpoint  server,
const SandeshConfig config,
bool  periodicuve 
)
staticprivate

Definition at line 123 of file sandesh.cc.

bool Sandesh::InitClient ( EventManager evm,
const std::vector< std::string > &  collectors,
const SandeshConfig config 
)
staticprivate

Definition at line 236 of file sandesh.cc.

Here is the call graph for this function:

bool Sandesh::InitCollector ( const std::string &  module,
const std::string &  source,
const std::string &  node_type,
const std::string &  instance_id,
EventManager evm,
const std::string &  collector_ip,
int  collector_port,
unsigned short  http_port,
SandeshContext client_context = NULL,
const SandeshConfig config = SandeshConfig() 
)
static

Definition at line 292 of file sandesh.cc.

bool Sandesh::InitGenerator ( const std::string &  module,
const std::string &  source,
const std::string &  node_type,
const std::string &  instance_id,
EventManager evm,
unsigned short  http_port,
const std::vector< std::string > &  collectors,
SandeshContext client_context = NULL,
DerivedStats  ds = DerivedStats(),
const SandeshConfig config = SandeshConfig() 
)
static

Definition at line 271 of file sandesh.cc.

Here is the call graph for this function:

bool Sandesh::InitGenerator ( const std::string &  module,
const std::string &  source,
const std::string &  node_type,
const std::string &  instance_id,
EventManager evm,
unsigned short  http_port,
SandeshContext client_context = NULL,
DerivedStats  ds = DerivedStats(),
const SandeshConfig config = SandeshConfig() 
)
static

Definition at line 257 of file sandesh.cc.

Here is the call graph for this function:

bool Sandesh::InitGeneratorTest ( const std::string &  module,
const std::string &  source,
const std::string &  node_type,
const std::string &  instance_id,
EventManager evm,
unsigned short  http_port,
SandeshContext client_context = NULL,
const SandeshConfig config = SandeshConfig() 
)
static

Definition at line 310 of file sandesh.cc.

bool Sandesh::Initialize ( SandeshRole::type  role,
const std::string &  module,
const std::string &  source,
const std::string &  node_type,
const std::string &  instance_id,
EventManager evm,
unsigned short  http_port,
SandeshContext client_context = NULL,
const SandeshConfig config = SandeshConfig() 
)
staticprivate

Definition at line 144 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::InitReceive ( int  recv_task_inst = -1)
staticprivate

Definition at line 115 of file sandesh.cc.

Here is the call graph for this function:

static std::string Sandesh::instance_id ( )
inlinestatic

Definition at line 293 of file p/sandesh.h.

static bool Sandesh::is_send_sampled_to_collector_enabled ( )
inlinestatic

Definition at line 337 of file p/sandesh.h.

static bool Sandesh::is_send_sampled_to_logger_enabled ( )
inlinestatic

Definition at line 339 of file p/sandesh.h.

static bool Sandesh::is_send_slo_to_collector_enabled ( )
inlinestatic

Definition at line 336 of file p/sandesh.h.

static bool Sandesh::is_send_slo_to_logger_enabled ( )
inlinestatic

Definition at line 338 of file p/sandesh.h.

static bool Sandesh::IsConnectToCollectorEnabled ( )
inlinestatic

Definition at line 242 of file p/sandesh.h.

static bool Sandesh::IsFlowCollectionDisabled ( )
inlinestatic

Definition at line 199 of file p/sandesh.h.

static bool Sandesh::IsFlowLoggingEnabled ( )
inlinestatic

Definition at line 225 of file p/sandesh.h.

bool Sandesh::IsLevelCategoryLoggingAllowed ( SandeshType::type  type,
SandeshLevel::type  level,
const std::string &  category 
)
staticprotected

Definition at line 821 of file sandesh.cc.

bool Sandesh::IsLevelUT ( SandeshLevel::type  level)
staticprotected

Definition at line 816 of file sandesh.cc.

static bool Sandesh::IsLocalLoggingEnabled ( )
inlinestatic

Definition at line 223 of file p/sandesh.h.

bool Sandesh::IsLoggingAllowed ( ) const

Definition at line 835 of file sandesh.cc.

bool Sandesh::IsLoggingDroppedAllowed ( SandeshType::type  type)
static

Definition at line 844 of file sandesh.cc.

bool Sandesh::IsSendingAllMessagesDisabled ( )
static

Definition at line 500 of file sandesh.cc.

bool Sandesh::IsSendingFlowsDisabled ( )
static

Definition at line 524 of file sandesh.cc.

bool Sandesh::IsSendingObjectLogsDisabled ( )
static

Definition at line 512 of file sandesh.cc.

bool Sandesh::IsSendingSystemLogsDisabled ( )
static

Definition at line 528 of file sandesh.cc.

static bool Sandesh::IsSendQueueEnabled ( )
inlinestatic

Definition at line 239 of file p/sandesh.h.

static bool Sandesh::IsSloSyslogEnabled ( )
inlinestatic

Definition at line 226 of file p/sandesh.h.

static bool Sandesh::IsTracePrintEnabled ( )
inlinestatic

Definition at line 229 of file p/sandesh.h.

static bool Sandesh::IsUnitTest ( )
inlinestaticprotected

Definition at line 375 of file p/sandesh.h.

SandeshLevel::type Sandesh::level ( ) const
inline

Definition at line 318 of file p/sandesh.h.

const char * Sandesh::LevelToString ( SandeshLevel::type  level)
static

Definition at line 852 of file sandesh.cc.

virtual void Sandesh::Log ( ) const
pure virtual
static log4cplus::Logger& Sandesh::logger ( )
inlinestatic

Definition at line 323 of file p/sandesh.h.

static std::string Sandesh::LoggingCategory ( )
inlinestatic

Definition at line 232 of file p/sandesh.h.

static SandeshLevel::type Sandesh::LoggingLevel ( )
inlinestatic

Definition at line 221 of file p/sandesh.h.

static SandeshLevel::type Sandesh::LoggingUtLevel ( )
inlinestatic

Definition at line 222 of file p/sandesh.h.

static std::string Sandesh::module ( )
inlinestatic

Definition at line 291 of file p/sandesh.h.

SandeshContext * Sandesh::module_context ( const std::string &  module_name)
static

Definition at line 949 of file sandesh.cc.

virtual std::string Sandesh::ModuleName ( ) const
pure virtual
virtual const char* Sandesh::Name ( ) const
inlinevirtual

Definition at line 277 of file p/sandesh.h.

static std::string Sandesh::node_type ( )
inlinestatic

Definition at line 295 of file p/sandesh.h.

bool Sandesh::ProcessRecv ( SandeshRequest rsnh)
staticprivate

Definition at line 563 of file sandesh.cc.

Here is the call graph for this function:

virtual int32_t Sandesh::Read ( boost::shared_ptr< contrail::sandesh::protocol::TProtocol iprot)
pure virtual
int32_t Sandesh::ReadBinary ( u_int8_t *  buf,
u_int32_t  buf_len,
int *  error 
)
virtual

Definition at line 590 of file sandesh.cc.

int32_t Sandesh::ReadBinaryFromFile ( const std::string &  path,
int *  error 
)
virtual

Definition at line 625 of file sandesh.cc.

int32_t Sandesh::ReceiveBinaryMsg ( u_int8_t *  buf,
u_int32_t  buf_len,
int *  error,
SandeshContext client_context 
)
static

Definition at line 684 of file sandesh.cc.

int32_t Sandesh::ReceiveBinaryMsgOne ( u_int8_t *  buf,
u_int32_t  buf_len,
int *  error,
SandeshContext client_context 
)
static

Definition at line 642 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::ReConfigCollectors ( const std::vector< std::string > &  collector_list)
static

Definition at line 230 of file sandesh.cc.

void Sandesh::RecordPort ( const std::string &  name,
const std::string &  module,
unsigned short  port 
)
static

Definition at line 191 of file sandesh.cc.

static SandeshRxQueue* Sandesh::recv_queue ( )
inlinestatic

Definition at line 298 of file p/sandesh.h.

virtual void Sandesh::Release ( )
inlinevirtual

Reimplemented in SandeshRequest.

Definition at line 266 of file p/sandesh.h.

static SandeshCallback Sandesh::response_callback ( )
inlinestatic

Definition at line 305 of file p/sandesh.h.

static SandeshRole::type Sandesh::role ( )
inlinestatic

Definition at line 296 of file p/sandesh.h.

static log4cplus::Logger& Sandesh::sampled_logger ( )
inlinestatic

Definition at line 325 of file p/sandesh.h.

const char * Sandesh::SandeshRoleToString ( SandeshRole::type  role)
static

Definition at line 100 of file sandesh.cc.

std::string Sandesh::scope ( ) const
inline

Definition at line 313 of file p/sandesh.h.

bool Sandesh::SendEnqueue ( )
protectedvirtual

Definition at line 702 of file sandesh.cc.

Here is the call graph for this function:

SandeshLevel::type Sandesh::SendingLevel ( )
static

Definition at line 975 of file sandesh.cc.

Here is the call graph for this function:

static bool Sandesh::SendReady ( SandeshConnection sconn = NULL)
static
virtual const uint32_t Sandesh::seqnum ( )
inlinevirtual

Reimplemented in SandeshTrace.

Definition at line 275 of file p/sandesh.h.

void Sandesh::set_category ( std::string  category)
inline

Definition at line 319 of file p/sandesh.h.

Here is the call graph for this function:

static void Sandesh::set_client_context ( SandeshContext context)
inlinestatic

Definition at line 300 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_context ( std::string  context)
inline

Definition at line 310 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_hints ( int32_t  hints)
inline

Definition at line 315 of file p/sandesh.h.

Here is the call graph for this function:

static void Sandesh::set_instance_id ( std::string &  instance_id)
inlinestatic

Definition at line 292 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_level ( SandeshLevel::type  level)
inline

Definition at line 317 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_logger_appender ( const std::string &  file_name,
long  max_file_size,
int  max_backup_index,
const std::string &  syslog_facility,
const std::vector< std::string > &  destn,
const std::string &  ident,
bool  is_sampled_logger 
)
static

Definition at line 1003 of file sandesh.cc.

Here is the call graph for this function:

static void Sandesh::set_module ( std::string &  module)
inlinestatic

Definition at line 290 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_module_context ( const std::string &  module_name,
SandeshContext context 
)
static

Definition at line 957 of file sandesh.cc.

void Sandesh::set_name ( const char *  name)
inlineprotected

Definition at line 344 of file p/sandesh.h.

static void Sandesh::set_node_type ( std::string &  node_type)
inlinestatic

Definition at line 294 of file p/sandesh.h.

Here is the call graph for this function:

static void Sandesh::set_response_callback ( SandeshCallback  response_cb)
inlinestatic

Definition at line 304 of file p/sandesh.h.

void Sandesh::set_scope ( std::string  scope)
inline

Definition at line 312 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_send_rate_limit ( int  rate_limit)
static

Definition at line 532 of file sandesh.cc.

void Sandesh::set_send_to_collector_flags ( const std::vector< std::string > &  sampled_destination,
const std::vector< std::string > &  slo_destination 
)
static

Definition at line 1056 of file sandesh.cc.

static void Sandesh::set_source ( std::string &  source)
inlinestatic

Definition at line 288 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_timestamp ( time_t  timestamp)
inlineprotected

Definition at line 342 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::set_type ( SandeshType::type  type)
inlineprotected

Definition at line 343 of file p/sandesh.h.

Here is the call graph for this function:

void Sandesh::SetDscpValue ( uint8_t  value)
static

Definition at line 334 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::SetFlowLogging ( bool  enable)
static

Definition at line 465 of file sandesh.cc.

void Sandesh::SetLocalLogging ( bool  enable)
static

Definition at line 447 of file sandesh.cc.

void Sandesh::SetLoggingCategory ( std::string  category)
static

Definition at line 438 of file sandesh.cc.

void Sandesh::SetLoggingLevel ( std::string  level)
static

Definition at line 390 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::SetLoggingLevel ( SandeshLevel::type  level)
static

Definition at line 417 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::SetLoggingParams ( bool  enable_local_log,
std::string  category,
std::string  level,
bool  enable_trace_print = false,
bool  enable_flow_log = false,
bool  enable_session_syslog = false 
)
static

Definition at line 369 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::SetLoggingParams ( bool  enable_local_log,
std::string  category,
SandeshLevel::type  level,
bool  enable_trace_print = false,
bool  enable_flow_log = false 
)
static

Definition at line 380 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::SetSendQueue ( bool  enable)
static

Definition at line 910 of file sandesh.cc.

void Sandesh::SetSessionSyslogging ( bool  enable_session_syslog)
static

Definition at line 474 of file sandesh.cc.

void Sandesh::SetTracePrint ( bool  enable)
static

Definition at line 456 of file sandesh.cc.

static log4cplus::Logger& Sandesh::slo_logger ( )
inlinestatic

Definition at line 324 of file p/sandesh.h.

static std::string Sandesh::source ( )
inlinestatic

Definition at line 289 of file p/sandesh.h.

SandeshLevel::type Sandesh::StringToLevel ( std::string  level)
static

Definition at line 861 of file sandesh.cc.

time_t Sandesh::timestamp ( ) const
inline

Definition at line 309 of file p/sandesh.h.

virtual std::string Sandesh::ToString ( ) const
pure virtual
SandeshType::type Sandesh::type ( ) const
inline

Definition at line 314 of file p/sandesh.h.

void Sandesh::Uninit ( )
static

Definition at line 341 of file sandesh.cc.

Here is the call graph for this function:

void Sandesh::UpdateRxMsgFailStats ( const std::string &  msg_name,
uint64_t  bytes,
SandeshRxDropReason::type  dreason 
)
static

Definition at line 878 of file sandesh.cc.

void Sandesh::UpdateRxMsgStats ( const std::string &  msg_name,
uint64_t  bytes 
)
static

Definition at line 872 of file sandesh.cc.

void Sandesh::UpdateTxMsgFailStats ( const std::string &  msg_name,
uint64_t  bytes,
SandeshTxDropReason::type  dreason 
)
static

Definition at line 890 of file sandesh.cc.

void Sandesh::UpdateTxMsgStats ( const std::string &  msg_name,
uint64_t  bytes 
)
static

Definition at line 884 of file sandesh.cc.

virtual const int32_t Sandesh::versionsig ( ) const
pure virtual
virtual int32_t Sandesh::Write ( boost::shared_ptr< contrail::sandesh::protocol::TProtocol oprot) const
pure virtual
int32_t Sandesh::WriteBinary ( u_int8_t *  buf,
u_int32_t  buf_len,
int *  error 
)
virtual

Definition at line 571 of file sandesh.cc.

int32_t Sandesh::WriteBinaryToFile ( const std::string &  path,
int *  error 
)
virtual

Definition at line 608 of file sandesh.cc.

Friends And Related Function Documentation

friend class SandeshTracePerfTest
friend

Definition at line 386 of file p/sandesh.h.

Member Data Documentation

std::string Sandesh::category_
private

Definition at line 444 of file p/sandesh.h.

SandeshClient * Sandesh::client_ = NULL
staticprotected

Definition at line 379 of file p/sandesh.h.

SandeshContext * Sandesh::client_context_ = NULL
staticprivate

Definition at line 414 of file p/sandesh.h.

SandeshConfig Sandesh::config_
staticprivate

Definition at line 432 of file p/sandesh.h.

bool Sandesh::connect_to_collector_ = false
staticprivate

Definition at line 423 of file p/sandesh.h.

std::string Sandesh::context_
private

Definition at line 438 of file p/sandesh.h.

bool Sandesh::disable_flow_collection_ = false
staticprivate

Definition at line 431 of file p/sandesh.h.

bool Sandesh::disable_sending_all_ = false
staticprivate

Definition at line 433 of file p/sandesh.h.

bool Sandesh::disable_sending_flows_ = false
staticprivate

Definition at line 435 of file p/sandesh.h.

bool Sandesh::disable_sending_object_logs_ = false
staticprivate

Definition at line 434 of file p/sandesh.h.

bool Sandesh::enable_flow_log_ = false
staticprivate

Definition at line 417 of file p/sandesh.h.

bool Sandesh::enable_local_log_ = false
staticprivate

Definition at line 416 of file p/sandesh.h.

bool Sandesh::enable_session_syslog_ = false
staticprivate

Definition at line 418 of file p/sandesh.h.

bool Sandesh::enable_trace_print_ = false
staticprivate

Definition at line 422 of file p/sandesh.h.

EventManager * Sandesh::event_manager_ = NULL
staticprivate

Definition at line 424 of file p/sandesh.h.

int32_t Sandesh::hints_
private

Definition at line 442 of file p/sandesh.h.

int Sandesh::http_port_ = 0
staticprivate

Definition at line 411 of file p/sandesh.h.

std::string Sandesh::instance_id_
staticprivate

Definition at line 410 of file p/sandesh.h.

SandeshLevel::type Sandesh::level_
private

Definition at line 443 of file p/sandesh.h.

log4cplus::Logger Sandesh::logger_
staticprivate
Initial value:
=
log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("SANDESH"))

Definition at line 428 of file p/sandesh.h.

std::string Sandesh::logging_category_
staticprivate

Definition at line 421 of file p/sandesh.h.

SandeshLevel::type Sandesh::logging_level_ = SandeshLevel::INVALID
staticprivate

Definition at line 419 of file p/sandesh.h.

SandeshLevel::type Sandesh::logging_ut_level_
staticprivate
Initial value:
=
getenv("SANDSH_UT_DEBUG") ? SandeshLevel::SYS_DEBUG : SandeshLevel::UT_DEBUG

Definition at line 420 of file p/sandesh.h.

std::string Sandesh::module_
staticprivate

Definition at line 407 of file p/sandesh.h.

Sandesh::ModuleContextMap Sandesh::module_context_
staticprivate

Definition at line 415 of file p/sandesh.h.

SandeshMessageStatistics Sandesh::msg_stats_
staticprivate

Definition at line 426 of file p/sandesh.h.

std::string Sandesh::name_
private

Definition at line 445 of file p/sandesh.h.

std::string Sandesh::node_type_
staticprivate

Definition at line 409 of file p/sandesh.h.

std::unique_ptr< Sandesh::SandeshRxQueue > Sandesh::recv_queue_
staticprivate

Definition at line 412 of file p/sandesh.h.

int Sandesh::recv_task_id_ = -1
staticprivate

Definition at line 413 of file p/sandesh.h.

Sandesh::SandeshCallback Sandesh::response_callback_ = 0
staticprotected

Definition at line 378 of file p/sandesh.h.

Sandesh::SandeshRole::type Sandesh::role_ = SandeshRole::Invalid
staticprivate

Definition at line 406 of file p/sandesh.h.

log4cplus::Logger Sandesh::sampled_logger_
staticprivate
Initial value:
=
log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("SAMPLED_SESSION"))

Definition at line 430 of file p/sandesh.h.

bool Sandesh::sampled_to_collector_ = false
staticprivate

Definition at line 448 of file p/sandesh.h.

bool Sandesh::sampled_to_logger_ = false
staticprivate

Definition at line 450 of file p/sandesh.h.

tbb::atomic< uint32_t > Sandesh::sandesh_send_ratelimit_
staticprivate

Definition at line 446 of file p/sandesh.h.

std::string Sandesh::scope_
private

Definition at line 440 of file p/sandesh.h.

bool Sandesh::send_queue_enabled_ = true
staticprivate

Definition at line 425 of file p/sandesh.h.

const uint32_t Sandesh::seqnum_
private

Definition at line 437 of file p/sandesh.h.

log4cplus::Logger Sandesh::slo_logger_
staticprivate
Initial value:
=
log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("SLO_SESSION"))

Definition at line 429 of file p/sandesh.h.

bool Sandesh::slo_to_collector_ = false
staticprivate

Definition at line 447 of file p/sandesh.h.

bool Sandesh::slo_to_logger_ = false
staticprivate

Definition at line 449 of file p/sandesh.h.

std::string Sandesh::source_
staticprivate

Definition at line 408 of file p/sandesh.h.

tbb::mutex Sandesh::stats_mutex_
staticprivate

Definition at line 427 of file p/sandesh.h.

time_t Sandesh::timestamp_
private

Definition at line 439 of file p/sandesh.h.

SandeshType::type Sandesh::type_
private

Definition at line 441 of file p/sandesh.h.


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