aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/menu/application.cpp')
-rw-r--r--src/menu/application.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/menu/application.cpp b/src/menu/application.cpp
index 37e532a2..d34b8003 100644
--- a/src/menu/application.cpp
+++ b/src/menu/application.cpp
@@ -30,11 +30,12 @@
#include "software_mouse_pointer.hpp"
#include "loading_frame.hpp"
#include <GL/gl.h>
+#include <log4cpp/PropertyConfigurator.hh>
namespace usdx
{
- log4cxx::LoggerPtr Application::log =
- log4cxx::Logger::getLogger("usdx.menu.application");
+ log4cpp::Category& Application::log =
+ log4cpp::Category::getInstance("usdx.menu.application");
Application* Application::instance = NULL;
@@ -43,6 +44,7 @@ namespace usdx
fps_manager(NULL), running(false), display_width(800),
display_height(600), frames_per_second(50)
{
+ log4cpp::PropertyConfigurator::configure("log4cpp.property");
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
}
@@ -119,7 +121,7 @@ namespace usdx
repaint();
SDL_GL_SwapBuffers();
- LOG4CXX_TRACE(log, "repaint");
+ log << log4cpp::Priority::DEBUG << "repaint";
// poll current events
while (event_manager.available() && SDL_PollEvent(&event)) {
@@ -185,8 +187,8 @@ namespace usdx
}
if (! display) {
- LOG4CXX_ERROR(log, "SDL_SetVideoMode failed.");
- throw new std::exception();
+ log << log4cpp::Priority::ERROR << "SDL_SetVideoMode failed.";
+ throw new std::exception();
}
init_fps_manager();