Panda3D
 All Classes Functions Variables Enumerations
pandaLogger.cxx
00001 // Filename: pandaLogger.cxx
00002 // Created by:  rdb (05May11)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "pandaLogger.h"
00016 
00017 #include "DefaultLogger.h"
00018 
00019 PandaLogger *PandaLogger::_ptr = NULL;
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //     Function: PandaLogger::set_default
00023 //       Access: Public
00024 //  Description: Makes sure there's a global PandaLogger object and
00025 //               makes sure that it is Assimp's default logger.
00026 ////////////////////////////////////////////////////////////////////
00027 void PandaLogger::
00028 set_default() {
00029   if (_ptr == NULL) {
00030     _ptr = new PandaLogger;
00031   }
00032   if (_ptr != Assimp::DefaultLogger::get()) {
00033     Assimp::DefaultLogger::set(_ptr);
00034   }
00035 }
00036 
00037 ////////////////////////////////////////////////////////////////////
00038 //     Function: PandaLogger::OnDebug
00039 //       Access: Public
00040 //  Description:
00041 ////////////////////////////////////////////////////////////////////
00042 void PandaLogger::OnDebug(const char *message) {
00043   assimp_cat.debug() << message << "\n";
00044 }
00045 
00046 ////////////////////////////////////////////////////////////////////
00047 //     Function: PandaLogger::OnError
00048 //       Access: Public
00049 //  Description:
00050 ////////////////////////////////////////////////////////////////////
00051 void PandaLogger::OnError(const char *message) {
00052   assimp_cat.error() << message << "\n";
00053 }
00054 
00055 ////////////////////////////////////////////////////////////////////
00056 //     Function: PandaLogger::OnInfo
00057 //       Access: Public
00058 //  Description:
00059 ////////////////////////////////////////////////////////////////////
00060 void PandaLogger::OnInfo(const char *message) {
00061   assimp_cat.info() << message << "\n";
00062 }
00063 
00064 ////////////////////////////////////////////////////////////////////
00065 //     Function: PandaLogger::OnWarn
00066 //       Access: Public
00067 //  Description:
00068 ////////////////////////////////////////////////////////////////////
00069 void PandaLogger::OnWarn(const char *message) {
00070   assimp_cat.warning() << message << "\n";
00071 }
 All Classes Functions Variables Enumerations