GCC Middle and Back End API Reference
ana::logger Class Reference

#include <analyzer-logging.h>

Collaboration diagram for ana::logger:

Public Member Functions

 logger (FILE *f_out, int flags, int verbosity, const pretty_printer &reference_pp)
 
 ~logger ()
 
void incref (const char *reason)
 
void decref (const char *reason)
 
void log (const char *fmt,...) ATTRIBUTE_GCC_DIAG(2
 
void void log_va (const char *fmt, va_list *ap) ATTRIBUTE_GCC_DIAG(2
 
void void void start_log_line ()
 
void log_partial (const char *fmt,...) ATTRIBUTE_GCC_DIAG(2
 
void void log_va_partial (const char *fmt, va_list *ap) ATTRIBUTE_GCC_DIAG(2
 
void void void end_log_line ()
 
void enter_scope (const char *scope_name)
 
void enter_scope (const char *scope_name, const char *fmt, va_list *ap) ATTRIBUTE_GCC_DIAG(3
 
void void exit_scope (const char *scope_name)
 
void inc_indent ()
 
void dec_indent ()
 
pretty_printerget_printer () const
 
FILEget_file () const
 

Private Member Functions

 DISABLE_COPY_AND_ASSIGN (logger)
 

Private Attributes

int m_refcount
 
FILEm_f_out
 
int m_indent_level
 
bool m_log_refcount_changes
 
pretty_printerm_pp
 

Detailed Description

A logger encapsulates a logging stream: a way to send
lines of pertinent information to a FILE *.   

Constructor & Destructor Documentation

◆ logger()

ana::logger::logger ( FILE * f_out,
int flags,
int verbosity,
const pretty_printer & reference_pp )

◆ ~logger()

ana::logger::~logger ( )

Member Function Documentation

◆ dec_indent()

void ana::logger::dec_indent ( )
inline

References m_indent_level.

◆ decref()

void ana::logger::decref ( const char * reason)

◆ DISABLE_COPY_AND_ASSIGN()

ana::logger::DISABLE_COPY_AND_ASSIGN ( logger )
private

◆ end_log_line()

void void void ana::logger::end_log_line ( )

◆ enter_scope() [1/2]

void ana::logger::enter_scope ( const char * scope_name)

◆ enter_scope() [2/2]

void ana::logger::enter_scope ( const char * scope_name,
const char * fmt,
va_list * ap )

◆ exit_scope()

void void ana::logger::exit_scope ( const char * scope_name)

◆ get_file()

FILE * ana::logger::get_file ( ) const
inline

References m_f_out.

Referenced by ana::log_user::get_logger_file().

◆ get_printer()

pretty_printer * ana::logger::get_printer ( ) const
inline

◆ inc_indent()

void ana::logger::inc_indent ( )
inline

References m_indent_level.

◆ incref()

void ana::logger::incref ( const char * reason)

◆ log()

◆ log_partial()

void ana::logger::log_partial ( const char * fmt,
... )

◆ log_va()

void void ana::logger::log_va ( const char * fmt,
va_list * ap )

Referenced by ana::log_user::log().

◆ log_va_partial()

void void ana::logger::log_va_partial ( const char * fmt,
va_list * ap )

◆ start_log_line()

void void void ana::logger::start_log_line ( )

Field Documentation

◆ m_f_out

FILE* ana::logger::m_f_out
private

Referenced by get_file().

◆ m_indent_level

int ana::logger::m_indent_level
private

Referenced by dec_indent(), and inc_indent().

◆ m_log_refcount_changes

bool ana::logger::m_log_refcount_changes
private

◆ m_pp

pretty_printer* ana::logger::m_pp
private

Referenced by get_printer().

◆ m_refcount

int ana::logger::m_refcount
private

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