Monero
Loading...
Searching...
No Matches
mlog.cpp File Reference
#include <time.h>
#include <atomic>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include "string_tools.h"
#include "time_helper.h"
#include "misc_log_ex.h"
Include dependency graph for mlog.cpp:

Namespaces

namespace  epee
 TODO: (mj-xmr) This will be reduced in an another PR.

Macros

#define _MLOG_H_
#define MONERO_DEFAULT_LOG_CATEGORY   "logging"
#define MLOG_BASE_FORMAT   "%datetime{%Y-%M-%d %H:%m:%s.%g}\t%thread\t%level\t%logger\t%loc\t%msg"
#define MLOG_LOG(x)
#define DEFLOG(fun, lev)

Functions

static std::string generate_log_filename (const char *base)
std::string mlog_get_default_log_path (const char *default_filename)
static void mlog_set_common_prefix ()
static const char * get_default_categories (int level)
void mlog_configure (const std::string &filename_base, bool console, const std::size_t max_log_file_size, const std::size_t max_log_files)
void mlog_set_categories (const char *categories)
std::string mlog_get_categories ()
void mlog_set_log_level (int level)
void mlog_set_log (const char *log)
bool epee::is_stdout_a_tty ()
static bool epee::is_nocolor ()
void epee::set_console_color (int color, bool bright)
void epee::reset_console_color ()
static bool mlog (el::Level level, const char *category, const char *format, va_list ap) noexcept

Macro Definition Documentation

◆ _MLOG_H_

#define _MLOG_H_

◆ DEFLOG

#define DEFLOG ( fun,
lev )
Value:
bool m##fun(const char *category, const char *fmt, ...) { va_list ap; va_start(ap, fmt); bool ret = mlog(el::Level::lev, category, fmt, ap); va_end(ap); return ret; }
static bool mlog(el::Level level, const char *category, const char *format, va_list ap) noexcept
Definition mlog.cpp:489

◆ MLOG_BASE_FORMAT

#define MLOG_BASE_FORMAT   "%datetime{%Y-%M-%d %H:%m:%s.%g}\t%thread\t%level\t%logger\t%loc\t%msg"

◆ MLOG_LOG

#define MLOG_LOG ( x)
Value:
Main entry point of each logging.
Definition easylogging++.h:3259
#define MONERO_DEFAULT_LOG_CATEGORY
Definition console_handler.h:49
#define CINFO(writer, dispatchAction,...)
Definition easylogging++.h:4070
@ FileOnlyLog
Definition easylogging++.h:2180

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "logging"

Function Documentation

◆ generate_log_filename()

std::string generate_log_filename ( const char * base)
static

◆ get_default_categories()

const char * get_default_categories ( int level)
static

◆ mlog()

bool mlog ( el::Level level,
const char * category,
const char * format,
va_list ap )
staticnoexcept

◆ mlog_configure()

void mlog_configure ( const std::string & filename_base,
bool console,
const std::size_t max_log_file_size,
const std::size_t max_log_files )

◆ mlog_get_categories()

std::string mlog_get_categories ( )

◆ mlog_get_default_log_path()

std::string mlog_get_default_log_path ( const char * default_filename)

◆ mlog_set_categories()

void mlog_set_categories ( const char * categories)

◆ mlog_set_common_prefix()

void mlog_set_common_prefix ( )
static

◆ mlog_set_log()

void mlog_set_log ( const char * log)

◆ mlog_set_log_level()

void mlog_set_log_level ( int level)