Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

vl::Log Class Reference

Utility class to generate logs. More...

#include <Log.hpp>

Inheritance diagram for vl::Log:
vl::Object vl::StandardLog

List of all members.

Public Member Functions

 Log ()
Logoperator<< (ELogLevel log_level)
Logoperator<< (const String &str)
Logoperator<< (const std::string &v)
Logoperator<< (const void *v)
Logoperator<< (const char *v)
Logoperator<< (char v)
Logoperator<< (unsigned char v)
Logoperator<< (short v)
Logoperator<< (unsigned short v)
Logoperator<< (int v)
Logoperator<< (unsigned int v)
Logoperator<< (long v)
Logoperator<< (unsigned long v)
Logoperator<< (long long v)
Logoperator<< (unsigned long long v)
Logoperator<< (double v)
Logoperator<< (float v)

Static Public Member Functions

static void setLogMutex (IMutex *mutex)
 The mutex used to synchronize concurrent calls to the log functions.
static IMutexlogMutex ()
 The mutex used to synchronize concurrent calls to the log functions.
static void notify (const String &message)
 Important application message for the user.
static void print (const String &message)
 Application message for the user.
static void debug (const String &message)
 Use this function to provide extra information useful to investigate and solve problems.
static void warning (const String &message)
 Use this function to provide information about situations that might lead to errors or loss of data.
static void error (const String &message)
 Use this function to provide information about run-time errors: file not found, out of memory, OpenGL version too old etc.
static void bug (const String &message)
 Use this function to provide information about programming errors: wrong parameter initialization, division by zero, imminent crash, inconsistent program state etc.
static void logSystemInfo ()
 Logs VL and system information.

Protected Member Functions

virtual void printImplementation (ELogLevel level, const String &message)=0

Protected Attributes

ELogLevel mLogLevel

Detailed Description

Utility class to generate logs.

Definition at line 45 of file Log.hpp.


Constructor & Destructor Documentation

vl::Log::Log (  ) [inline]

Definition at line 50 of file Log.hpp.

References vl::LL_LogPrint, and VL_DEBUG_SET_OBJECT_NAME.


Member Function Documentation

Log& vl::Log::operator<< ( ELogLevel  log_level ) [inline]

Definition at line 56 of file Log.hpp.

Log& vl::Log::operator<< ( const String str ) [inline]
Log& vl::Log::operator<< ( const std::string &  v ) [inline]

Definition at line 72 of file Log.hpp.

References vl::String::fromStdString().

Log& vl::Log::operator<< ( const void *  v ) [inline]

Definition at line 78 of file Log.hpp.

References vl::String::fromPointer().

Log& vl::Log::operator<< ( const char *  v ) [inline]

Definition at line 84 of file Log.hpp.

Log& vl::Log::operator<< ( char  v ) [inline]

Definition at line 90 of file Log.hpp.

Log& vl::Log::operator<< ( unsigned char  v ) [inline]

Definition at line 96 of file Log.hpp.

References vl::String::fromUInt().

Log& vl::Log::operator<< ( short  v ) [inline]

Definition at line 102 of file Log.hpp.

References vl::String::fromInt().

Log& vl::Log::operator<< ( unsigned short  v ) [inline]

Definition at line 108 of file Log.hpp.

References vl::String::fromUInt().

Log& vl::Log::operator<< ( int  v ) [inline]

Definition at line 114 of file Log.hpp.

References vl::String::fromInt().

Log& vl::Log::operator<< ( unsigned int  v ) [inline]

Definition at line 120 of file Log.hpp.

References vl::String::fromUInt().

Log& vl::Log::operator<< ( long  v ) [inline]

Definition at line 126 of file Log.hpp.

References vl::String::fromLongLong().

Log& vl::Log::operator<< ( unsigned long  v ) [inline]

Definition at line 132 of file Log.hpp.

References vl::String::fromULongLong().

Log& vl::Log::operator<< ( long long  v ) [inline]

Definition at line 138 of file Log.hpp.

References vl::String::fromLongLong().

Log& vl::Log::operator<< ( unsigned long long  v ) [inline]

Definition at line 144 of file Log.hpp.

References vl::String::fromULongLong().

Log& vl::Log::operator<< ( double  v ) [inline]

Definition at line 150 of file Log.hpp.

References vl::String::fromDouble().

Log& vl::Log::operator<< ( float  v ) [inline]

Definition at line 156 of file Log.hpp.

References vl::String::fromDouble().

virtual void vl::Log::printImplementation ( ELogLevel  level,
const String message 
) [protected, pure virtual]

Implemented in vl::StandardLog.

Referenced by bug(), debug(), error(), notify(), print(), and warning().

static void vl::Log::setLogMutex ( IMutex mutex ) [inline, static]

The mutex used to synchronize concurrent calls to the log functions.

You should always install a log mutex when using VL in multi-threaded applications.

Definition at line 172 of file Log.hpp.

static IMutex* vl::Log::logMutex (  ) [inline, static]

The mutex used to synchronize concurrent calls to the log functions.

Definition at line 175 of file Log.hpp.

Referenced by bug(), debug(), error(), notify(), print(), and warning().

void Log::notify ( const String message ) [static]

Important application message for the user.

The message will be printed with an hightlighed color.

Note:
Log generated only if verbosity level != vl::VEL_VERBOSITY_SILENT

Synchronize log across threads.

Definition at line 126 of file Log.cpp.

References vl::defLogger(), vl::globalSettings(), vl::LL_LogNotify, logMutex(), printImplementation(), SET_TEXT_COLOR_GREEN, and vl::VEL_VERBOSITY_SILENT.

void Log::print ( const String message ) [static]
void Log::debug ( const String message ) [static]
void Log::warning ( const String message ) [static]

Use this function to provide information about situations that might lead to errors or loss of data.

Note:
Log generated only if verbosity level >= vl::VEL_VERBOSITY_ERROR

Synchronize log across threads.

Definition at line 155 of file Log.cpp.

References vl::defLogger(), vl::globalSettings(), vl::LL_LogWarning, logMutex(), printImplementation(), SET_TEXT_COLOR_YELLOW, and vl::VEL_VERBOSITY_ERROR.

Referenced by vl::DrawCall::applyPatchParameters(), vl::GLSLProgram::applyUniformSet(), vl::Renderable::boundingBox(), vl::Renderable::boundingSphere(), vl::GLSLShader::compile(), vl::Geometry::computeNormals(), vl::Geometry::convertToVertexAttribs(), vl::LoadWriterManager::findLoader(), vl::LoadWriterManager::findWriter(), vl::DaeLoader::generateGeometry(), vl::VLXClassWrapper_GLSLShader::importGLSLShader(), vl::isDDS(), vl::isTGA(), vl::GLSLProgram::linkProgram(), vl::ZippedDirectory::listFilesRecursive(), vl::MemoryDirectory::listFilesRecursive(), vl::loadDDS(), vl::ObjLoader::loadOBJ(), vl::GLSLProgram::programBinary(), vl::DrawElements< ArrayUShort1 >::render(), vl::DrawArrays::render(), vl::Texture::setMipLevel(), vl::ZippedDirectory::setPath(), vl::MemoryDirectory::setPath(), vl::PolygonSimplifier::simplify(), vl::Geometry::sortVertices(), vl::Tessellator::tessellate(), vl::VLXVisitorLinkMapper::visitList(), vl::VLXVisitorLinker::visitList(), vl::VLXVisitorExportToVLT::visitList(), vl::VLXVisitorExportToVLB::visitList(), vl::VLXVisitorCountIDs::visitList(), vl::OpenGLContext::~OpenGLContext(), and vl::Transform::~Transform().

void Log::error ( const String message ) [static]

Use this function to provide information about run-time errors: file not found, out of memory, OpenGL version too old etc.

Note:
Log generated only if verbosity level >= vl::VEL_VERBOSITY_ERROR

Synchronize log across threads.

Definition at line 165 of file Log.cpp.

References vl::defLogger(), vl::globalSettings(), vl::LL_LogError, logMutex(), printImplementation(), SET_TEXT_COLOR_RED, and vl::VEL_VERBOSITY_ERROR.

Referenced by vl::ActorTree::addChild(), vl::EdgeExtractor::addEdge(), vl::MemoryDirectory::addFile(), vl::PlyLoader::analyzeHeader(), vl::Material::apply(), vl::OpenGLContext::applyEnables(), vl::OpenGLContext::areUniformsColliding(), vl::Framebuffer::bindDrawBuffers(), vl::FramebufferObject::bindFramebuffer(), vl::OpenGLContext::bindVAS(), vl::Framebuffer::checkDrawBuffers(), vl::FramebufferObject::checkFramebufferStatus(), vl::ActorKdTree::child(), vlWin32::choosePixelFormat(), vl::GZipCodec::close(), vl::GLSLShader::compile(), vl::Portal::computeNormal(), vl::Image::contrast(), vl::Image::convertFormat(), vl::Image::convertType(), vl::CopyTexSubImage3D::copyPixels(), vl::createCubemap(), vl::Texture::createTexture(), vl::DiskDirectory::diskSubDir(), vl::Image::equalize(), vl::DiskDirectory::exists(), vl::VLXClassWrapper_DrawCall::exportDrawCall(), vl::VLXClassWrapper_Uniform::exportUniform(), vl::ZippedFile::extract(), vl::EdgeExtractor::extractEdges(), vl::Extrusion::extrude(), vl::ZippedFile::fillUncompressedBuffer(), vl::GZipCodec::fillUncompressedBuffer(), vl::String::filterStrings(), vl::FontManager::FontManager(), vl::String::fromUTF16(), vl::SlicedVolume::generateTextureCoordinates(), vl::RaycastVolume::generateTextureCoordinates(), vl::genRGBAVolume(), vl::genRGBAVolumeT(), vl::PlyLoader::PlyScalar::getAsFloat(), vl::PlyLoader::PlyScalar::getAsInt(), vl::DaeLoader::getSource(), vl::VLTTokenizer::getToken(), vl::VLXClassWrapper_Geometry::importGeometry(), vl::VLXClassWrapper_Uniform::importUniform(), vl::VLXClassWrapper_VertexAttribInfo::importVLX(), vl::VLXClassWrapper_Array::importVLX(), vl::Terrain::init(), vl::MorphingCallback::init(), vl::ZippedDirectory::init(), vl::OpenGLContext::initGLContext(), vl::SceneManagerPortals::initialize(), vlSDL::SDLWindow::initSDLWindow(), vl::FBORenderbufferAttachment::initStorage(), vlWin32::Win32Context::initWin32GLContext(), vl::OpenGLContext::isCleanState(), vl::ZippedDirectory::listFiles(), vl::MemoryDirectory::listFiles(), vl::DiskDirectory::listFiles(), vl::ZippedDirectory::listFilesRecursive(), vl::MemoryDirectory::listFilesRecursive(), vl::ZippedDirectory::listSubDirs(), vl::MemoryDirectory::listSubDirs(), vl::DiskDirectory::listSubDirs(), vl::LoadWriterDae::load(), vl::DaeLoader::load(), vl::VirtualFile::load(), vl::load3DS(), vl::loadAC3D(), vl::loadBMP(), vl::loadCubemap(), vl::loadDAT(), vl::loadDDS(), vl::loadDICOM(), vl::loadImage(), vl::DaeLoader::loadImages(), vl::loadJPG(), vl::loadMD2(), vl::loadMOL2(), vl::loadOBJ(), vl::ObjLoader::loadOBJ(), vl::ObjLoader::loadObjMaterials(), vl::loadPLY(), vl::loadPNG(), vl::loadRAW(), vl::LoadWriterManager::loadResource(), vl::loadSTL(), vl::String::loadText(), vl::loadTGA(), vl::loadTIFF(), vl::loadVLB(), vl::loadVLT(), vlEGL::EGLWindow::makeCurrent(), vl::Geometry::makeGLESFriendly(), vl::MemoryDirectory::memorySubDir(), vl::ZippedFile::open(), vl::MemoryFile::open(), vl::GZipCodec::open(), vl::DiskFile::open(), vl::VLXParserVLT::parse(), vl::VLXParserVLB::parse(), vl::A3DSLoader::parse3DS(), vl::DaeLoader::parseEffects(), vl::DaeLoader::parseGeometry(), vl::VLXParserVLT::parseHeader(), vl::ObjTexture::parseLine(), vl::DaeLoader::parseNode(), vl::VLXParserVLT::parseStructure(), vl::VirtualFile::peek(), vl::VectorGraphics::popMatrix(), vl::VectorGraphics::popScissor(), vl::VectorGraphics::popState(), vl::DiskFile::position_Implementation(), vl::Text::rawboundingRect(), vl::CoreText::rawboundingRect(), vl::PlyLoader::PlyScalar::read(), vl::A3DSLoader::read_3D_EDITOR_CHUNK(), vl::GZipCodec::read_Implementation(), vl::DiskFile::read_Implementation(), vl::A3DSLoader::read_MATERIAL_BLOCK(), vl::A3DSLoader::read_OBJECT_BLOCK(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::A3DSLoader::readColChunk(), vl::PlyLoader::readHeader(), vl::A3DSLoader::readMapChunk(), vl::ReadPixels::readPixels(), vl::Rendering::render(), vl::Renderer::render(), vl::OcclusionCullRenderer::render(), vl::MultiDrawElements< ArrayUShort1 >::render(), vl::DrawElements< ArrayUShort1 >::render(), vl::DrawArrays::render(), vl::Clear::render_Implementation(), vl::OcclusionCullRenderer::render_pass1(), vl::Text::renderText(), vl::CoreText::renderText(), vl::BezierPatch::resize(), vl::saveDICOM(), vl::saveImage(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vl::saveVLB(), vl::saveVLT(), vl::VirtualFile::seekSet(), vl::GZipCodec::seekSet_Implementation(), vl::DiskFile::seekSet_Implementation(), vl::ActorTree::setChild(), vl::Texture::setMipLevel(), vl::ZippedDirectory::setPath(), vl::VirtualDirectory::setPath(), vl::MemoryDirectory::setPath(), vl::GLSLShader::setSource(), vl::DaeLoader::setup_vl_Effect(), vl::PolygonSimplifier::simplify(), vl::DiskFile::size(), vl::A3DSLoader::skipChunk(), vl::Geometry::sortVertices(), vl::Image::substituteColorGreenKey(), vl::Image::substituteColorRGB_RGB(), vl::Image::substituteColorRGB_RGBA(), vl::Texture::supports(), vlEGL::EGLWindow::swapBuffers(), vl::Tessellator::tessBeginData(), vl::Tessellator::tessellate(), vl::Tessellator::tessError(), vl::Tessellator::tessVertexData(), vl::Texture::Texture(), vl::PlyLoader::translateType(), vl::MarchingCubes::updateAlpha(), vl::MarchingCubes::updateColor(), vl::KeyValues::value(), vl::vlx_EClearColorMode(), vl::vlx_EClearFlags(), vl::vlx_EColorMaterial(), vl::vlx_EDepthTextureMode(), vl::vlx_EEnable(), vl::vlx_EPolygonFace(), vl::vlx_EPrimitiveType(), vl::vlx_EProjectionMatrixType(), vl::vlx_ETexCompareFunc(), vl::vlx_ETexCompareMode(), vl::vlx_ETexParamFilter(), vl::vlx_ETexParamWrap(), vl::vlx_ETextureDimension(), vl::vlx_ETextureFormat(), vl::vlx_EUniformType(), vl::vlx_EVertexAttribInterpretation(), vl::vlx_mat4(), vl::GZipCodec::write_Implementation(), vl::DiskFile::write_Implementation(), vl::LoadWriterManager::writeResource(), vl::ZippedDirectory::ZippedDirectory(), and vl::ZippedDirectory::zippedSubDir().

void Log::bug ( const String message ) [static]
void Log::logSystemInfo (  ) [static]

Member Data Documentation

Definition at line 165 of file Log.hpp.


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:06.
Permission is granted to use this page to write and publish articles regarding Visualization Library.