Blender V5.0
log.cpp File Reference
#include "util/log.h"
#include "util/math.h"
#include "util/string.h"
#include "util/time.h"
#include <cstdio>

Go to the source code of this file.

Functions

const char * log_level_to_string (const LogLevel level)
LogLevel log_string_to_level (const string &str)
void log_init (const LogFunction func)
void log_level_set (const LogLevel level)
void log_level_set (const std::string &level)
static void log_default (const LogLevel level, const std::string &time_str, const char *msg)
void _log_message (const LogLevel level, const char *file_line, const char *func, const char *msg)
std::ostream & operator<< (std::ostream &os, const int2 &value)
std::ostream & operator<< (std::ostream &os, const float3 &value)
std::ostream & operator<< (std::ostream &os, const float4 &value)

Variables

CCL_NAMESPACE_BEGIN LogLevel LOG_LEVEL = LOG_LEVEL_INFO_IMPORTANT
static LogFunction LOG_FUNCTION
static double LOG_START_TIME = time_dt()

Function Documentation

◆ _log_message()

void _log_message ( const LogLevel level,
const char * file_line,
const char * func,
const char * msg )

◆ log_default()

void log_default ( const LogLevel level,
const std::string & time_str,
const char * msg )
static

Definition at line 93 of file log.cpp.

References LOG_LEVEL_INFO, log_level_to_string(), and printf.

Referenced by _log_message().

◆ log_init()

◆ log_level_set() [1/2]

void log_level_set ( const LogLevel level)

Definition at line 78 of file log.cpp.

References LOG_LEVEL.

Referenced by options_parse(), RenderGraph::SetUp(), and RenderGraph::TearDown().

◆ log_level_set() [2/2]

void log_level_set ( const std::string & level)

Definition at line 83 of file log.cpp.

References LOG_ERROR, LOG_LEVEL, LOG_LEVEL_UNKNOWN, and log_string_to_level().

◆ log_level_to_string()

◆ log_string_to_level()

LogLevel log_string_to_level ( const string & str)

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream & os,
const float3 & value )

Definition at line 137 of file log.cpp.

References float3::x, float3::y, and float3::z.

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream & os,
const float4 & value )

Definition at line 143 of file log.cpp.

References float4::w, float4::x, float4::y, and float4::z.

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream & os,
const int2 & value )

Definition at line 131 of file log.cpp.

References int2::x, and int2::y.

Variable Documentation

◆ LOG_FUNCTION

LogFunction LOG_FUNCTION
static

Definition at line 18 of file log.cpp.

Referenced by _log_message(), and log_init().

◆ LOG_LEVEL

Definition at line 17 of file log.cpp.

Referenced by _log_message(), log_level_set(), and log_level_set().

◆ LOG_START_TIME

double LOG_START_TIME = time_dt()
static

Definition at line 19 of file log.cpp.

Referenced by _log_message(), and log_init().