GraphChi 0.1

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros
Public Member Functions | Static Public Member Functions
file_logger Class Reference

`#include <logger.hpp>`

List of all members.

## Public Member Functions
void | set_log_to_console (bool consolelog)
| If consolelog is true, subsequent logger output will be written to stderr.
std::string | get_log_file (void)
| Returns the current logger file.
bool | get_log_to_console ()
| Returns true if output is being written to stderr.
int | get_log_level ()
| Returns the current logger level.
template<typename T >
file_logger & | operator<< (T a)
file_logger & | operator<< (const char *a)
file_logger & | operator<< (std::ostream &(*f)(std::ostream &))
void | set_log_level (int new_log_level)
| file_logger ()
bool | set_log_file (std::string file)
void | textcolor (FILE *handle, int attr, int fg)
void | reset_color (FILE *handle)
void | _log (int lineloglevel, const char *file, const char *function, int line, const char *fmt, va_list ap)
void | _logbuf (int lineloglevel, const char *file, const char *function, int line, const char *buf, int len)
void | _lograw (int lineloglevel, const char *buf, int len)
file_logger & | start_stream (int lineloglevel, const char *file, const char *function, int line)
void | stream_flush ()

## Static Public Member Functions
static void | streambuffdestructor (void *v)

## Detailed Description

logging class. This writes to a file, and/or the system console.

## Constructor & Destructor Documentation

file_logger::file_logger | ( |  | ) |
| inline

Default constructor. By default, log_to_console is off, there is no logger file, and logger level is set to LOG_WARNING

## Member Function Documentation

void file_logger::set_log_level | ( | int | new_log_level | ) |
| inline

Sets the current logger level. All logging commands below the current logger level will not be written.

void file_logger::set_log_to_console | ( | bool | consolelog | ) |
| inline

If consolelog is true, subsequent logger output will be written to stderr.

Closes the current logger file if one exists. if 'file' is not an empty string, it will be opened and all subsequent logger output will be written into 'file'. Any existing content of 'file' will be cleared. Return true on success and false on failure.

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

- src/logger/logger.hpp