From 9cb390dc3be41600ebace6969f9cd36cd2dcc021 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 29 Nov 2011 05:06:08 +0100 Subject: moved all log messages a level up log4cpp does not provide the TRACE log level. so it is needed that all log messages shift a level up, so that DEBUG is used in replacement of TRACE and INFO is now used for all messages that were DEBUG --- log4cpp.property | 2 +- src/base/songloading/songloading_strategy_txt.cpp | 16 ++++++++-------- test/base/image.cpp | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/log4cpp.property b/log4cpp.property index 4bcad324..2f66ba11 100644 --- a/log4cpp.property +++ b/log4cpp.property @@ -1,4 +1,4 @@ -log4cpp.rootCategory=DEBUG,console +log4cpp.rootCategory=INFO,console log4cpp.category.usdx=,roll log4cpp.appender.console=org.apache.log4j.ConsoleAppender diff --git a/src/base/songloading/songloading_strategy_txt.cpp b/src/base/songloading/songloading_strategy_txt.cpp index d3551144..e390b781 100644 --- a/src/base/songloading/songloading_strategy_txt.cpp +++ b/src/base/songloading/songloading_strategy_txt.cpp @@ -53,7 +53,7 @@ namespace usdx std::size_t pos = line.find(':'); if (line[0] != '#' || pos == std::string::npos) { - log << log4cpp::Priority::DEBUG << + log << log4cpp::Priority::INFO << "Tried to parse invalid header line: '" << line << "'"; throw "Invalid header!"; } @@ -74,7 +74,7 @@ namespace usdx // line is already rtrimmed boost::trim_left(result.second); - log << log4cpp::Priority::DEBUG << "Found header: '" << + log << log4cpp::Priority::INFO << "Found header: '" << result.first << "' with value '" << result.second << "'"; return result; @@ -82,7 +82,7 @@ namespace usdx Song* SongloadingStrategyTxt::load_song(Song *song) { - log << log4cpp::Priority::DEBUG << + log << log4cpp::Priority::INFO << "Starting loading song from file: " << song->get_filename(); TextFile file(song->get_filename()); @@ -152,12 +152,12 @@ namespace usdx linestream >> line_out; if (linestream.good()) { linestream >> line_in; - log << log4cpp::Priority::DEBUG << "Found newline in line " << + log << log4cpp::Priority::INFO << "Found newline in line " << line_number << " with out of last line with " << line_out << " and in of next line " << line_in; } else { - log << log4cpp::Priority::DEBUG << "Found newline in line " << + log << log4cpp::Priority::INFO << "Found newline in line " << line_number << " with out of last line with " << line_out; } @@ -171,7 +171,7 @@ namespace usdx LocaleIndependentFloat new_bpm; linestream >> beat >> new_bpm; - log << log4cpp::Priority::DEBUG << "Found new bpm in line " << + log << log4cpp::Priority::INFO << "Found new bpm in line " << line_number << " starting at beat: " << beat << " and new bpm of " << new_bpm.get_value(); song->new_bpm(beat, new_bpm.get_value()); @@ -188,7 +188,7 @@ namespace usdx getline(linestream, lyric); boost::trim_right_if(lyric, boost::is_cntrl()); - log << log4cpp::Priority::DEBUG << "Found lyric: '" << lyric << + log << log4cpp::Priority::INFO << "Found lyric: '" << lyric << "' at line: " << line_number << " at beat: " << beat << " with length: " << length << " at height: " << height; song->new_note(type, beat, length, height, lyric); @@ -206,7 +206,7 @@ namespace usdx boost::trim(line); boost::trim_if(line, boost::is_cntrl()); - log << log4cpp::Priority::DEBUG << "Line: " << line; + log << log4cpp::Priority::INFO << "Line: " << line; if (header && line[0] == '#') { diff --git a/test/base/image.cpp b/test/base/image.cpp index e9e9d3d4..d91d553c 100644 --- a/test/base/image.cpp +++ b/test/base/image.cpp @@ -57,7 +57,7 @@ namespace usdx { Image img("./testdata/test.bmp"); const SDL_Surface *surface = img.get_surface(); - log << log4cpp::Priority::DEBUG << "test.bmp: " << + log << log4cpp::Priority::INFO << "test.bmp: " << "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); @@ -67,7 +67,7 @@ namespace usdx { Image img("./testdata/test.jpg"); const SDL_Surface *surface = img.get_surface(); - log << log4cpp::Priority::DEBUG << "test.jpg: " << + log << log4cpp::Priority::INFO << "test.jpg: " << "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); @@ -77,7 +77,7 @@ namespace usdx { Image img("./testdata/test.png"); const SDL_Surface *surface = img.get_surface(); - log << log4cpp::Priority::DEBUG << "test.png: " << + log << log4cpp::Priority::INFO << "test.png: " << "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); @@ -87,7 +87,7 @@ namespace usdx { Image img("./testdata/test.gif"); const SDL_Surface *surface = img.get_surface(); - log << log4cpp::Priority::DEBUG << "test.gif: " << + log << log4cpp::Priority::INFO << "test.gif: " << "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); @@ -97,7 +97,7 @@ namespace usdx { Image img("./testdata/testsong_correct.txt"); const SDL_Surface *surface = img.get_surface(); - log << log4cpp::Priority::DEBUG << "testsong_correct.txt: " << + log << log4cpp::Priority::INFO << "testsong_correct.txt: " << "w = " << surface->w << "; h = " << surface->h; } }; -- cgit v1.2.3