Skip to content

Commit

Permalink
use LOG_G instead of std::cerr
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Oct 26, 2014
1 parent cef5e2e commit 91b845d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/gettext_boost.cpp
Expand Up @@ -14,11 +14,19 @@

#include "global.hpp"
#include "gettext.hpp"
#include "log.hpp"

#include <iostream>
#include <locale>
#include <boost/locale.hpp>
#include <set>


#define DBG_G LOG_STREAM(debug, lg::general)
#define LOG_G LOG_STREAM(info, lg::general)
#define WRN_G LOG_STREAM(warn, lg::general)
#define ERR_G LOG_STREAM(err, lg::general)

namespace
{
struct translation_manager
Expand Down Expand Up @@ -90,7 +98,7 @@ std::string dsngettext (const char * domainname, const char *singular, const cha

void bind_textdomain(const char* domain, const char* direcory, const char* /*encoding*/)
{
std::cerr << "adding textdomain '" << domain << "' in directory '" << direcory << "'\n";
LOG_G << "adding textdomain '" << domain << "' in directory '" << direcory << "'\n";
get_manager().generator_.add_messages_domain(domain);
get_manager().generator_.add_messages_path(direcory);
get_manager().update_locale();
Expand All @@ -107,7 +115,7 @@ void set_language(const std::string& language, const std::vector<std::string>* /
{
// why shoudl we need alternates? which languages we support shoudl only be related
// to which languages we ship with and not which the os supports
std::cerr << "setting language to '" << language << "' \n";
LOG_G << "setting language to '" << language << "' \n";
std::string::size_type at_pos = language.rfind('@');
if(at_pos != std::string::npos)
{
Expand Down

0 comments on commit 91b845d

Please sign in to comment.