BIRNET Interface Reference

/opt/src/beast/birnet/birnetmsg.hh

SYNOPSIS

DESCRIPTION

Birnet::Msg

/opt/src/beast/birnet/birnetmsg.hh:26

   
Type  register_type 
(const char *ident,
 Type        default_ouput,
 const char *label);
Register a new message type with identifier ident and user digestible name label. If this function is called multiple times with the same identifier, the type id acquired by the first call will be returned and the other arguments are ignored. As long as the new message type isn't configured individually via msg_enable(), allow_msgs() or their complements, it shares the configuration of default_ouput. If NONE or ALWAYS is passed as default_ouput, this corresponds to the first two message types which are unconfigrable and always have their output disabled or enabled respectively. As an exception to the rest of the message API, this function may be called before birnet_init(). However note, that MT-safety is only ensured for calls occouring after birnet_init(). This function is MT-safe and may be called from any thread.
ident: message identifier
default_ouput: an existing SfiMsgType
label: a translated version of ident
RETURNS: message type id


Type  lookup_type 
(const String  &ident);
Find the message type correspondign to ident. If no message type was found NONE is returned. This function is MT-safe and may be called from any thread.
ident: message identifier, e.g. "error", "warning", "info", etc...
RETURNS: corresponding Type or 0


const char*  type_ident 
(Type mtype);
Retrive the string identifying the message type type. For invalid (non registered) message types, "" is returned. This function is MT-safe and may be called from any thread.
type: message type, e.g. Msg::ERROR, Msg::WARNING, Msg::INFO, etc...
RETURNS: translated message identifier or NULL


const char*  type_label 
(Type mtype);
Retrive the label identifying the message type type. Usually, this is a translated version of Msg::type_ident() or "" if non was registered with the message type. This function is MT-safe and may be called from any thread.
type: message type, e.g. Msg::ERROR, Msg::WARNING, Msg::INFO, etc...
RETURNS: translated message identifier or NULL


uint32  type_flags 
(Type mtype);

bool  check 
(Type mtype);

void  enable 
(Type mtype);

void  disable 
(Type mtype);

void  configure 
(Type           mtype,
 LogFlags       log_mask,
 const String  &logfile);

void  allow_msgs 
(const String  &key);

void  deny_msgs 
(const String  &key);

void  configure_stdlog 
(bool           redirect_stdlog_to_stderr,
 const String  &stdlog_filename,
 uint           syslog_priority);

void  display 
(Type         message_type,
 const Part  &p0,
 const Part  &p1,
 const Part  &p2,
 const Part  &p3,
 const Part  &p4,
 const Part  &p5,
 const Part  &p6,
 const Part  &p7,
 const Part  &p8,
 const Part  &p9);

void  display 
(const CustomType  &message_type,
 const char        *format,
 ...);

void  set_thread_handler 
(Handler handler);
Set the handler function for messages logged in the current thread. If NULL is specified as handler, the standard handler will be used. For handler implementations that require an extra data argument, see Thread::set_data(). This function is MT-safe and may be called from any thread.
handler: a valid Msg::Handler or NULL


void  default_handler 
(const char            *domain,
 Type                   mtype,
 const vector< Part >  &parts);
This is the standard message handler, it produces message in a prominent way on stderr. This function is MT-safe and may be called from any thread.
domain: message domain
parts: message parts


void  display_parts 
(const char            *domain,
 Type                   message_type,
 const vector< Part >  &parts);

void  display_aparts 
(const char  *log_domain,
 Type         message_type,
 const Part  &p0,
 const Part  &p1,
 const Part  &p2,
 const Part  &p3,
 const Part  &p4,
 const Part  &p5,
 const Part  &p6,
 const Part  &p7,
 const Part  &p8,
 const Part  &p9);

void  display_vmsg 
(const char *log_domain,
 Type        message_type,
 const char *format,
 va_list     args);



void  key_list_change_L 
(const String  &keylist,
 bool           isenabled);

void  set_msg_type_L 
(uint   mtype,
 uint32 flags,
 bool   enabled);

Birnet::Msg::Check

/opt/src/beast/birnet/birnetmsg.hh:140

Birnet::Msg::Custom

/opt/src/beast/birnet/birnetmsg.hh:144

   
  BIRNET_PRINTF 
();

Birnet::Msg::CustomType

/opt/src/beast/birnet/birnetmsg.hh:148

   
  CustomType 
(const char *ident,
 Type        default_ouput,
 const char *label);


Birnet::Msg::Part

/opt/src/beast/birnet/birnetmsg.hh:78

   
  Part 
();

void  setup 
(uint8  ptype,
 String smsg);

void  setup 
(uint8       ptype,
 const char *format,
 va_list     varargs);

Birnet::Msg::Text0

/opt/src/beast/birnet/birnetmsg.hh:124

Birnet::Msg::Text1

/opt/src/beast/birnet/birnetmsg.hh:128

Birnet::Msg::Text2

/opt/src/beast/birnet/birnetmsg.hh:132

Birnet::Msg::Text3

/opt/src/beast/birnet/birnetmsg.hh:136