Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Utility class to generate logs. More...
#include <Log.hpp>
Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| Log () | |
Static Public Member Functions | |
| static void | setLogMutex (IMutex *mutex) |
| The mutex used to synchronize concurrent calls to the log functions. | |
| static IMutex * | logMutex () |
| The mutex used to synchronize concurrent calls to the log functions. | |
| static void | print (const String &message) |
| static void | info (const String &message) |
| Use this function to provide extra information useful to the end 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 Types | |
| enum | ELogLevel { LogBug, LogError, LogWarning, LogNormal, LogInfo, LogDebug } |
Protected Member Functions | |
| virtual void | printImplementation (ELogLevel level, const String &message)=0 |
Utility class to generate logs.
Definition at line 45 of file Log.hpp.
enum vl::Log::ELogLevel [protected] |
| vl::Log::Log | ( | ) | [inline] |
Definition at line 61 of file Log.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
| virtual const char* vl::Log::className | ( | ) | [inline, virtual] |
| static void vl::Log::setLogMutex | ( | IMutex * | mutex ) | [inline, static] |
| static IMutex* vl::Log::logMutex | ( | ) | [inline, static] |
| void Log::print | ( | const String & | message ) | [static] |
Synchronize log across threads.
Definition at line 123 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), logMutex(), LogNormal, printImplementation(), and vl::VEL_VERBOSITY_SILENT.
Referenced by vlWin32::choosePixelFormat(), vlSDL::SDLWindow::initSDLWindow(), vl::Applet::keyReleaseEvent(), vl::loadMD2(), vl::ObjLoader::loadOBJ(), vl::OpenGLContext::logOpenGLInfo(), logSystemInfo(), vl::A3DSLoader::parse3DS(), vl::KeyValues::print(), vl::readPixels(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), vl::DrawArrays::render(), vl::GZipCodec::seekSet_Implementation(), vl::VisualizationLibrary::shutdownCore(), and vl::PolygonSimplifier::simplify().
| void Log::info | ( | const String & | message ) | [static] |
Use this function to provide extra information useful to the end user.
The string "Info: " is prepended to the message.
Synchronize log across threads.
Definition at line 141 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), LogInfo, logMutex(), printImplementation(), and vl::VEL_VERBOSITY_NORMAL.
Referenced by vl::loadTGA().
| void Log::debug | ( | const String & | message ) | [static] |
Use this function to provide extra information useful to investigate and solve problems.
The string "Debug: " is prepended to the message.
Synchronize log across threads.
Definition at line 132 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), LogDebug, logMutex(), printImplementation(), and vl::VEL_VERBOSITY_DEBUG.
Referenced by vl::Image::isValid().
| void Log::warning | ( | const String & | message ) | [static] |
Use this function to provide information about situations that might lead to errors or loss of data.
The string "Warning: " is prepended to the message.
Synchronize log across threads.
Definition at line 150 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), logMutex(), LogWarning, 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::LoadWriterManager::findLoader(), vl::LoadWriterManager::findWriter(), vl::isDDS(), vl::isTGA(), vl::GLSLProgram::linkProgram(), vl::ZippedDirectory::listFilesRecursive(), vl::MemoryDirectory::listFilesRecursive(), vl::loadDDS(), vl::ObjLoader::loadOBJ(), vl::GLSLProgram::programBinary(), vl::Texture::setMipLevel(), vl::PolygonSimplifier::simplify(), vl::Random::standardFillRandom(), vl::Tessellator::tessellate(), 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.
The string "Error: " is prepended to the message.
Synchronize log across threads.
Definition at line 160 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), 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::OpenGLContext::applyEnables(), vl::OpenGLContext::applyRenderStates(), vl::OpenGLContext::areUniformsColliding(), vl::RenderTarget::bindDrawBuffers(), vl::FBORenderTarget::bindFramebuffer(), vl::RenderTarget::checkDrawBuffers(), vl::FBORenderTarget::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::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::Terrain::init(), vl::MorphingCallback::init(), vl::ZippedDirectory::init(), vl::SceneManagerPortals::initialize(), vlSDL::SDLWindow::initSDLWindow(), vl::FBORenderbufferAttachment::initStorage(), vlWin32::Win32Context::initWin32GLContext(), vl::OpenGLContext::isCleanState(), vl::Light::Light(), vl::ZippedDirectory::listFiles(), vl::MemoryDirectory::listFiles(), vl::ZippedDirectory::listFilesRecursive(), vl::MemoryDirectory::listFilesRecursive(), vl::ZippedDirectory::listSubDirs(), vl::MemoryDirectory::listSubDirs(), vl::VirtualFile::load(), vl::load3DS(), vl::loadAC3D(), vl::loadBMP(), vl::loadCubemap(), vl::loadDAT(), vl::loadDDS(), vl::loadDICOM(), vl::loadImage(), 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::log_failed_check(), vl::MemoryDirectory::memorySubDir(), vl::ZippedFile::open(), vl::MemoryFile::open(), vl::GZipCodec::open(), vl::DiskFile::open(), vl::A3DSLoader::parse3DS(), vl::ObjTexture::parseLine(), vl::VirtualFile::peek(), vl::VectorGraphics::popMatrix(), vl::VectorGraphics::popScissor(), vl::VectorGraphics::popState(), vl::DiskFile::position_Implementation(), vl::Text::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< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::render(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), vl::DrawArrays::render(), vl::Clear::render_Implementation(), vl::OcclusionCullRenderer::render_pass1(), vl::Text::renderText(), vl::BezierPatch::resize(), vl::saveDICOM(), vl::saveImage(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vl::VirtualFile::seekSet(), vl::GZipCodec::seekSet_Implementation(), vl::DiskFile::seekSet_Implementation(), vl::ActorTree::setChild(), vl::Light::setLightIndex(), vl::Texture::setMipLevel(), vl::ZippedDirectory::setPath(), vl::VirtualDirectory::setPath(), vl::MemoryDirectory::setPath(), vl::GLSLShader::setSource(), vl::PolygonSimplifier::simplify(), vl::DiskFile::size(), vl::A3DSLoader::skipChunk(), vl::Image::substituteColorGreenKey(), vl::Image::substituteColorRGB_RGB(), vl::Image::substituteColorRGB_RGBA(), vl::Texture::supports(), 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::GZipCodec::write_Implementation(), vl::DiskFile::write_Implementation(), vl::LoadWriterManager::writeResource(), vl::ZippedDirectory::ZippedDirectory(), and vl::ZippedDirectory::zippedSubDir().
| void Log::bug | ( | const String & | message ) | [static] |
Use this function to provide information about programming errors: wrong parameter initialization, division by zero, imminent crash, inconsistent program state etc.
The string "Bug: " is prepended to the message.
Synchronize log across threads.
Definition at line 170 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), LogBug, logMutex(), printImplementation(), SET_TEXT_COLOR_PURPLE, and vl::VEL_VERBOSITY_ERROR.
Referenced by vl::Viewport::activate(), vl::Camera::adjustView(), vl::Image::allocate2D(), vl::TextureUnit::apply(), vl::TexParameter::apply(), vl::GLSLProgram::applyUniformSet(), vl::FBOTexture2DAttachment::bindAttachment(), vl::GLSLShader::compile(), vl::Texture::createTexture(), vl::VisualizationLibrary::initCore(), vl::GLSLProgram::linkProgram(), vl::FBORenderTarget::printFramebufferError(), vl::GLSLProgram::programBinary(), vl::TexParameter::setMagFilter(), vl::Texture::setMipLevel(), vl::Texture::Texture(), vl::GLSLProgram::useProgram(), and vl::Object::~Object().
| void Log::logSystemInfo | ( | ) | [static] |
Logs VL and system information.
Definition at line 180 of file Log.cpp.
References vl::globalSettings(), print(), vl::VEL_VERBOSITY_DEBUG, vl::VEL_VERBOSITY_ERROR, and vl::VEL_VERBOSITY_NORMAL.
Referenced by vl::VisualizationLibrary::initCore().