diff options
Diffstat (limited to '')
-rw-r--r-- | src/base/song.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/base/song.cpp b/src/base/song.cpp index 209f13de..af7e90a5 100644 --- a/src/base/song.cpp +++ b/src/base/song.cpp @@ -30,8 +30,8 @@ namespace usdx { - log4cxx::LoggerPtr Song::log = - log4cxx::Logger::getLogger("usdx.base.Song"); + log4cpp::Category& Song::log = + log4cpp::Category::getInstance("usdx.base.Song"); const boost::filesystem::wpath& Song::get_filename(void) const { @@ -98,7 +98,7 @@ namespace usdx lyrics.clear(); } - std::string Song::get_header_tag(const std::string& tag, const bool required) + std::string Song::get_header_tag(const std::string& tag, const bool required) { std::map<std::string, std::string>::iterator it; std::string result = ""; @@ -108,9 +108,9 @@ namespace usdx custom_header_tags.erase(it); } else if (required) { - LOG4CXX_ERROR(log, "Incomplete Song! Missing '" << tag << "' Tag in: '" << - get_filename() << "'"); - throw MissingTagException(tag, "Incomplete Song! Missing Tag."); + log << log4cpp::Priority::ERROR << "Incomplete Song! Missing '" << + tag << "' Tag in: '" << get_filename() << "'"; + throw MissingTagException(tag, "Incomplete Song! Missing Tag."); } return result; @@ -126,8 +126,8 @@ namespace usdx custom_header_tags.erase(it); } else if (required) { - LOG4CXX_ERROR(log, "Incomplete Song! Missing '" << tag << "' Tag in: '" << - get_filename() << "'"); + log << log4cpp::Priority::ERROR << "Incomplete Song! Missing '" << + tag << "' Tag in: '" << get_filename() << "'"; throw MissingTagException(tag, "Incomplete Song! Missing Tag."); } @@ -145,8 +145,8 @@ namespace usdx stream >> result; } else if (required) { - LOG4CXX_ERROR(log, "Incomplete Song! Missing '" << tag << "' Tag in: '" << - get_filename() << "'"); + log << log4cpp::Priority::ERROR << "Incomplete Song! Missing '" << + tag << "' Tag in: '" << get_filename() << "'"; throw MissingTagException(tag, "Incomplete Song! Missing Tag."); } @@ -167,8 +167,8 @@ namespace usdx custom_header_tags.erase(it); } else if (required) { - LOG4CXX_ERROR(log, "Incomplete Song! Missing '" << tag << "' Tag in: '" << - get_filename() << "'"); + log << log4cpp::Priority::ERROR << "Incomplete Song! Missing '" << + tag << "' Tag in: '" << get_filename() << "'"; throw MissingTagException(tag, "Incomplete Song! Missing Tag."); } |