wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src actions.cpp ai.cpp ai_attack.cpp ai...


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src actions.cpp ai.cpp ai_attack.cpp ai...
Date: Sat, 26 Mar 2005 12:10:33 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    05/03/26 17:10:32

Modified files:
        src            : actions.cpp ai.cpp ai_attack.cpp ai_move.cpp 
                         builder.cpp cavegen.cpp config.cpp dialogs.cpp 
                         display.cpp filesystem.cpp font.cpp 
                         game_events.cpp gamestatus.hpp hotkeys.cpp 
                         image.cpp map.cpp map_create.cpp mapgen.cpp 
                         multiplayer.cpp multiplayer_connect.cpp 
                         multiplayer_ui.cpp multiplayer_wait.cpp 
                         network.cpp network_worker.cpp pathfind.cpp 
                         playlevel.cpp playturn.cpp replay.cpp 
                         sdl_utils.cpp show_dialog.cpp team.cpp 
                         theme.cpp titlescreen.cpp unit.cpp 
                         unit_display.cpp unit_types.cpp video.cpp 
                         wassert.cpp 
        src/serialization: binary_wml.cpp parser.cpp preprocessor.cpp 
                           string_utils.cpp 
        src/widgets    : textbox.cpp 

Log message:
        Switch to the new logging macro.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.200&tr2=1.201&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai.cpp.diff?tr1=1.143&tr2=1.144&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai_attack.cpp.diff?tr1=1.60&tr2=1.61&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai_move.cpp.diff?tr1=1.58&tr2=1.59&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/builder.cpp.diff?tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/cavegen.cpp.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/config.cpp.diff?tr1=1.134&tr2=1.135&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/dialogs.cpp.diff?tr1=1.93&tr2=1.94&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/display.cpp.diff?tr1=1.310&tr2=1.311&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/filesystem.cpp.diff?tr1=1.64&tr2=1.65&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/font.cpp.diff?tr1=1.127&tr2=1.128&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game_events.cpp.diff?tr1=1.136&tr2=1.137&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gamestatus.hpp.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/hotkeys.cpp.diff?tr1=1.69&tr2=1.70&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/image.cpp.diff?tr1=1.78&tr2=1.79&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/map.cpp.diff?tr1=1.57&tr2=1.58&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/map_create.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/mapgen.cpp.diff?tr1=1.59&tr2=1.60&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer.cpp.diff?tr1=1.152&tr2=1.153&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_connect.cpp.diff?tr1=1.132&tr2=1.133&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_ui.cpp.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_wait.cpp.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network.cpp.diff?tr1=1.59&tr2=1.60&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network_worker.cpp.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/pathfind.cpp.diff?tr1=1.64&tr2=1.65&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playlevel.cpp.diff?tr1=1.195&tr2=1.196&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.351&tr2=1.352&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/replay.cpp.diff?tr1=1.99&tr2=1.100&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.cpp.diff?tr1=1.77&tr2=1.78&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/show_dialog.cpp.diff?tr1=1.119&tr2=1.120&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/team.cpp.diff?tr1=1.85&tr2=1.86&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/theme.cpp.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/titlescreen.cpp.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.cpp.diff?tr1=1.131&tr2=1.132&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit_display.cpp.diff?tr1=1.56&tr2=1.57&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit_types.cpp.diff?tr1=1.93&tr2=1.94&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/video.cpp.diff?tr1=1.62&tr2=1.63&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/wassert.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/binary_wml.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/parser.cpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/preprocessor.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/string_utils.cpp.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/textbox.cpp.diff?tr1=1.74&tr2=1.75&r1=text&r2=text

Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.200 wesnoth/src/actions.cpp:1.201
--- wesnoth/src/actions.cpp:1.200       Tue Mar 22 23:42:36 2005
+++ wesnoth/src/actions.cpp     Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.200 2005/03/22 23:42:36 ydirson Exp $ */
+/* $Id: actions.cpp,v 1.201 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -45,8 +45,8 @@
 #include <string>
 #include <sstream>
 
-#define LOG_NG lg::info(lg::engine)
-#define ERR_NW lg::err(lg::network)
+#define LOG_NG LOG_STREAM(info, engine)
+#define ERR_NW LOG_STREAM(err, network)
 
 struct castle_cost_calculator : cost_calculator
 {
@@ -1296,7 +1296,7 @@
 
        statistics::advance_unit(new_unit);
        preferences::encountered_units().insert(new_unit.type().name());
-       lg::info(lg::config) << "Added '" << new_unit.type().name() << "' to 
encountered units\n";
+       LOG_STREAM(info, config) << "Added '" << new_unit.type().name() << "' 
to encountered units\n";
 
        units.erase(loc);
        units.insert(std::pair<gamemap::location,unit>(loc,new_unit));
Index: wesnoth/src/ai.cpp
diff -u wesnoth/src/ai.cpp:1.143 wesnoth/src/ai.cpp:1.144
--- wesnoth/src/ai.cpp:1.143    Fri Mar 18 21:21:48 2005
+++ wesnoth/src/ai.cpp  Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: ai.cpp,v 1.143 2005/03/18 21:21:48 ydirson Exp $ */
+/* $Id: ai.cpp,v 1.144 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -34,7 +34,7 @@
 
 #include <iostream>
 
-#define LOG_AI lg::info(lg::ai)
+#define LOG_AI LOG_STREAM(info, ai)
 
 ///a trivial ai that sits around doing absolutely nothing
 class idle_ai : public ai_interface {
@@ -195,7 +195,7 @@
        else if(name == "ai2")
                return new ai2(info);
        else if(name != "")
-               lg::err(lg::ai) << "AI not found: '" << name << "'\n";
+               LOG_STREAM(err, ai) << "AI not found: '" << name << "'\n";
 
        return new ai(info);
 }
@@ -374,7 +374,7 @@
        log_scope2(ai, "move_unit");
        unit_map::iterator u_it = info_.units.find(from);
        if(u_it == info_.units.end()) {
-               lg::err(lg::ai) << "Could not find unit at " << from.x << ", " 
<< from.y << "\n";
+               LOG_STREAM(err, ai) << "Could not find unit at " << from.x << 
", " << from.y << "\n";
                wassert(false);
                return location();
        }
@@ -911,7 +911,7 @@
 
                const location arrived_at = move_unit(from,to,possible_moves);
                if(arrived_at != to) {
-                       lg::warn(lg::ai) << "unit moving to attack has ended up 
unexpectedly at "
+                       LOG_STREAM(warn, ai) << "unit moving to attack has 
ended up unexpectedly at "
                                << (arrived_at.x + 1) << "," << (arrived_at.y + 
1) << " when moving to "
                                << (to.x + 1) << "," << (to.y + 1) << " moved 
from "
                                << (from.x + 1) << "," << (from.y + 1) << "\n";
@@ -940,7 +940,7 @@
 
        if(info_.units.count(u) && info_.units.count(target)) {
                if(info_.units.find(target)->second.stone()) {
-                       lg::err(lg::ai) << "attempt to attack unit that is 
turned to stone\n";
+                       LOG_STREAM(err, ai) << "attempt to attack unit that is 
turned to stone\n";
                        return;
                }
 
@@ -1345,7 +1345,7 @@
                //we didn't arrive at our intended destination. We return true, 
meaning that
                //the AI algorithm should be recalculated from the start.
                if(arrived_at != move.second) {
-                       lg::warn(lg::ai) << "didn't arrive at destination\n";
+                       LOG_STREAM(warn, ai) << "didn't arrive at 
destination\n";
                        return true;
                }
 
Index: wesnoth/src/ai_attack.cpp
diff -u wesnoth/src/ai_attack.cpp:1.60 wesnoth/src/ai_attack.cpp:1.61
--- wesnoth/src/ai_attack.cpp:1.60      Thu Mar 10 20:17:17 2005
+++ wesnoth/src/ai_attack.cpp   Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: ai_attack.cpp,v 1.60 2005/03/10 20:17:17 ydirson Exp $ */
+/* $Id: ai_attack.cpp,v 1.61 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -27,7 +27,7 @@
 #include <iostream>
 #include <set>
 
-#define LOG_AI lg::info(lg::ai)
+#define LOG_AI LOG_STREAM(info, ai)
 
 const int max_positions = 10000;
 
@@ -258,7 +258,7 @@
                cur_stats = cache_itor->stats;
 
                if(!(size_t(cache_itor->weapon) < 
itor->second.attacks().size())) {
-                       lg::err(lg::ai) << "cached illegal weapon: " << 
cache_itor->weapon
+                       LOG_STREAM(err, ai) << "cached illegal weapon: " << 
cache_itor->weapon
                                  << "/" << itor->second.attacks().size() << 
"\n";
                }
 
Index: wesnoth/src/ai_move.cpp
diff -u wesnoth/src/ai_move.cpp:1.58 wesnoth/src/ai_move.cpp:1.59
--- wesnoth/src/ai_move.cpp:1.58        Wed Mar  9 21:21:37 2005
+++ wesnoth/src/ai_move.cpp     Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: ai_move.cpp,v 1.58 2005/03/09 21:21:37 ydirson Exp $ */
+/* $Id: ai_move.cpp,v 1.59 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -22,7 +22,7 @@
 
 #include <iostream>
 
-#define LOG_AI lg::info(lg::ai)
+#define LOG_AI LOG_STREAM(info, ai)
 
 struct move_cost_calculator : cost_calculator
 {
Index: wesnoth/src/builder.cpp
diff -u wesnoth/src/builder.cpp:1.48 wesnoth/src/builder.cpp:1.49
--- wesnoth/src/builder.cpp:1.48        Wed Mar 23 08:52:10 2005
+++ wesnoth/src/builder.cpp     Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: builder.cpp,v 1.48 2005/03/23 08:52:10 silene Exp $ */
+/* $Id: builder.cpp,v 1.49 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2004 by Philippe Plantier <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -23,7 +23,7 @@
 #include "wassert.hpp"
 #include "serialization/string_utils.hpp"
 
-#define ERR_NG lg::err(lg::engine)
+#define ERR_NG LOG_STREAM(err, engine)
 
 namespace {
 
@@ -706,7 +706,7 @@
                        if((**tc)["pos"].size()) {
                                int pos = atoi((**tc)["pos"].c_str());
                                if(anchors.find(pos) == anchors.end()) {
-                                       lg::warn(lg::engine) << "Invalid 
anchor!\n";
+                                       LOG_STREAM(warn, engine) << "Invalid 
anchor!\n";
                                        continue;
                                }
 
Index: wesnoth/src/cavegen.cpp
diff -u wesnoth/src/cavegen.cpp:1.17 wesnoth/src/cavegen.cpp:1.18
--- wesnoth/src/cavegen.cpp:1.17        Wed Mar  9 20:39:20 2005
+++ wesnoth/src/cavegen.cpp     Sat Mar 26 17:10:32 2005
@@ -7,7 +7,7 @@
 #include "wassert.hpp"
 #include "serialization/string_utils.hpp"
 
-#define LOG_NG lg::info(lg::engine)
+#define LOG_NG LOG_STREAM(info, engine)
 
 cave_map_generator::cave_map_generator(const config* cfg) : wall_('W'), 
clear_('u'), village_('D'), castle_('o'),
                                                             cfg_(cfg), 
width_(50), height_(50), village_density_(0),
Index: wesnoth/src/config.cpp
diff -u wesnoth/src/config.cpp:1.134 wesnoth/src/config.cpp:1.135
--- wesnoth/src/config.cpp:1.134        Thu Mar 24 08:19:13 2005
+++ wesnoth/src/config.cpp      Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: config.cpp,v 1.134 2005/03/24 08:19:13 silene Exp $ */
+/* $Id: config.cpp,v 1.135 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -21,7 +21,7 @@
 #include "variable.hpp"
 #include "wassert.hpp"
 
-#define ERR_CF lg::err(lg::config)
+#define ERR_CF LOG_STREAM(err, config)
 
 config::config(const config& cfg)
 {
Index: wesnoth/src/dialogs.cpp
diff -u wesnoth/src/dialogs.cpp:1.93 wesnoth/src/dialogs.cpp:1.94
--- wesnoth/src/dialogs.cpp:1.93        Tue Mar 22 23:42:36 2005
+++ wesnoth/src/dialogs.cpp     Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: dialogs.cpp,v 1.93 2005/03/22 23:42:36 ydirson Exp $ */
+/* $Id: dialogs.cpp,v 1.94 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -43,8 +43,8 @@
 #include <time.h>
 #include <vector>
 
-#define LOG_DP lg::info(lg::display)
-#define ERR_G  lg::err(lg::general)
+#define LOG_DP LOG_STREAM(info, display)
+#define ERR_G  LOG_STREAM(err, general)
 
 namespace dialogs
 {
Index: wesnoth/src/display.cpp
diff -u wesnoth/src/display.cpp:1.310 wesnoth/src/display.cpp:1.311
--- wesnoth/src/display.cpp:1.310       Thu Mar 24 21:35:50 2005
+++ wesnoth/src/display.cpp     Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: display.cpp,v 1.310 2005/03/24 21:35:50 ydirson Exp $ */
+/* $Id: display.cpp,v 1.311 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -43,7 +43,7 @@
 #include <iostream>
 #include <sstream>
 
-#define ERR_DP lg::err(lg::display)
+#define ERR_DP LOG_STREAM(err, display)
 
 std::map<gamemap::location,fixed_t> display::debugHighlights_;
 
@@ -109,7 +109,7 @@
                        flag = teams_[i].flag();
                }
 
-               lg::info(lg::display) << "Adding flag for team " << i << " from 
animation " << flag << "\n";
+               LOG_STREAM(info, display) << "Adding flag for team " << i << " 
from animation " << flag << "\n";
                flags_.push_back(animated<image::locator>(flag));
                flags_.back().start_animation(0, 
animated<image::locator>::INFINITE_CYCLES);
        }
Index: wesnoth/src/filesystem.cpp
diff -u wesnoth/src/filesystem.cpp:1.64 wesnoth/src/filesystem.cpp:1.65
--- wesnoth/src/filesystem.cpp:1.64     Sat Mar 26 14:07:16 2005
+++ wesnoth/src/filesystem.cpp  Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: filesystem.cpp,v 1.64 2005/03/26 14:07:16 silene Exp $ */
+/* $Id: filesystem.cpp,v 1.65 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -63,7 +63,7 @@
 #include "scoped_resource.hpp"
 #include "util.hpp"
 
-#define LOG_G lg::info(lg::general)
+#define LOG_G LOG_STREAM(info, general)
 
 #ifdef USE_ZIPIOS
 #include <sstream>
Index: wesnoth/src/font.cpp
diff -u wesnoth/src/font.cpp:1.127 wesnoth/src/font.cpp:1.128
--- wesnoth/src/font.cpp:1.127  Sat Mar 26 15:32:25 2005
+++ wesnoth/src/font.cpp        Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: font.cpp,v 1.127 2005/03/26 15:32:25 silene Exp $ */
+/* $Id: font.cpp,v 1.128 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -39,9 +39,9 @@
 #include <stack>
 #include <string>
 
-#define LOG_FT lg::info(lg::display)
-#define WRN_FT lg::warn(lg::display)
-#define ERR_FT lg::err(lg::display)
+#define LOG_FT LOG_STREAM(info, display)
+#define WRN_FT LOG_STREAM(warn, display)
+#define ERR_FT LOG_STREAM(err, display)
 
 //Deliberately breaking compilation with the original SDL_ttf library. Remove
 //the lines below to be able to do this anyway, however this is buggy and may
Index: wesnoth/src/game_events.cpp
diff -u wesnoth/src/game_events.cpp:1.136 wesnoth/src/game_events.cpp:1.137
--- wesnoth/src/game_events.cpp:1.136   Thu Mar 24 08:26:45 2005
+++ wesnoth/src/game_events.cpp Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: game_events.cpp,v 1.136 2005/03/24 08:26:45 silene Exp $ */
+/* $Id: game_events.cpp,v 1.137 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -39,10 +39,10 @@
 #include <set>
 #include <string>
 
-#define LOG_NG lg::info(lg::engine)
-#define WRN_NG lg::warn(lg::engine)
-#define ERR_NG lg::err(lg::engine)
-#define LOG_DP lg::info(lg::display)
+#define LOG_NG LOG_STREAM(info, engine)
+#define WRN_NG LOG_STREAM(warn, engine)
+#define ERR_NG LOG_STREAM(err, engine)
+#define LOG_DP LOG_STREAM(info, display)
 
 namespace game_events {
 
Index: wesnoth/src/gamestatus.hpp
diff -u wesnoth/src/gamestatus.hpp:1.39 wesnoth/src/gamestatus.hpp:1.40
--- wesnoth/src/gamestatus.hpp:1.39     Tue Mar 22 23:42:36 2005
+++ wesnoth/src/gamestatus.hpp  Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: gamestatus.hpp,v 1.39 2005/03/22 23:42:36 ydirson Exp $ */
+/* $Id: gamestatus.hpp,v 1.40 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -116,7 +116,7 @@
                std::map<std::string, player_info>::iterator 
found=players.find(id);
 
                if(found==players.end()) {
-                       lg::warn(lg::engine) << "player " << id << " does not 
exist." << std::endl;
+                       LOG_STREAM(warn, engine) << "player " << id << " does 
not exist." << std::endl;
                        return NULL;
                } else {
                        return &found->second;
Index: wesnoth/src/hotkeys.cpp
diff -u wesnoth/src/hotkeys.cpp:1.69 wesnoth/src/hotkeys.cpp:1.70
--- wesnoth/src/hotkeys.cpp:1.69        Thu Mar 10 22:29:57 2005
+++ wesnoth/src/hotkeys.cpp     Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: hotkeys.cpp,v 1.69 2005/03/10 22:29:57 ydirson Exp $ */
+/* $Id: hotkeys.cpp,v 1.70 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -32,7 +32,7 @@
 #include <cstdlib>
 #include <map>
 
-#define ERR_G lg::err(lg::general)
+#define ERR_G LOG_STREAM(err, general)
 
 namespace {
 
Index: wesnoth/src/image.cpp
diff -u wesnoth/src/image.cpp:1.78 wesnoth/src/image.cpp:1.79
--- wesnoth/src/image.cpp:1.78  Wed Mar  9 17:01:09 2005
+++ wesnoth/src/image.cpp       Sat Mar 26 17:10:32 2005
@@ -17,8 +17,8 @@
 #include <map>
 #include <string>
 
-#define LOG_DP lg::info(lg::display)
-#define ERR_DP lg::err(lg::display)
+#define LOG_DP LOG_STREAM(info, display)
+#define ERR_DP LOG_STREAM(err, display)
 
 namespace {
 
Index: wesnoth/src/map.cpp
diff -u wesnoth/src/map.cpp:1.57 wesnoth/src/map.cpp:1.58
--- wesnoth/src/map.cpp:1.57    Sun Mar 20 22:07:14 2005
+++ wesnoth/src/map.cpp Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: map.cpp,v 1.57 2005/03/20 22:07:14 Sirp Exp $ */
+/* $Id: map.cpp,v 1.58 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -27,8 +27,8 @@
 #include <iostream>
 #include <sstream>
 
-#define ERR_CF lg::err(lg::config)
-#define LOG_G lg::info(lg::general)
+#define ERR_CF LOG_STREAM(err, config)
+#define LOG_G LOG_STREAM(info, general)
 
 gamemap::location gamemap::location::null_location;
 
Index: wesnoth/src/map_create.cpp
diff -u wesnoth/src/map_create.cpp:1.5 wesnoth/src/map_create.cpp:1.6
--- wesnoth/src/map_create.cpp:1.5      Thu Mar 24 07:41:00 2005
+++ wesnoth/src/map_create.cpp  Sat Mar 26 17:10:32 2005
@@ -11,7 +11,7 @@
 #include <string>
 #include <vector>
 
-#define ERR_CF lg::err(lg::config)
+#define ERR_CF LOG_STREAM(err, config)
 
 map_generator* create_map_generator(const std::string& name, const config* cfg)
 {
Index: wesnoth/src/mapgen.cpp
diff -u wesnoth/src/mapgen.cpp:1.59 wesnoth/src/mapgen.cpp:1.60
--- wesnoth/src/mapgen.cpp:1.59 Sat Mar  5 16:07:54 2005
+++ wesnoth/src/mapgen.cpp      Sat Mar 26 17:10:32 2005
@@ -20,8 +20,8 @@
 #include "util.hpp"
 #include "serialization/string_utils.hpp"
 
-#define ERR_CF lg::err(lg::config)
-#define LOG_NG lg::info(lg::engine)
+#define ERR_CF LOG_STREAM(err, config)
+#define LOG_NG LOG_STREAM(info, engine)
 
 config map_generator::create_scenario(const std::vector<std::string>& args)
 {
Index: wesnoth/src/multiplayer.cpp
diff -u wesnoth/src/multiplayer.cpp:1.152 wesnoth/src/multiplayer.cpp:1.153
--- wesnoth/src/multiplayer.cpp:1.152   Thu Mar 24 21:35:52 2005
+++ wesnoth/src/multiplayer.cpp Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer.cpp,v 1.152 2005/03/24 21:35:52 ydirson Exp $ */
+/* $Id: multiplayer.cpp,v 1.153 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C)
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -29,7 +29,7 @@
 #include "replay.hpp"
 #include "video.hpp"
 
-#define LOG_NW lg::info(lg::network)
+#define LOG_NW LOG_STREAM(info, network)
 
 namespace {
 
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.132 
wesnoth/src/multiplayer_connect.cpp:1.133
--- wesnoth/src/multiplayer_connect.cpp:1.132   Wed Mar 23 18:11:52 2005
+++ wesnoth/src/multiplayer_connect.cpp Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.132 2005/03/23 18:11:52 j_daniel Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.133 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -25,10 +25,10 @@
 #include "wassert.hpp"
 #include "serialization/string_utils.hpp"
 
-#define LOG_NW lg::info(lg::network)
-#define ERR_NW lg::err(lg::network)
-#define LOG_CF lg::info(lg::config)
-#define ERR_CF lg::err(lg::config)
+#define LOG_NW LOG_STREAM(info, network)
+#define ERR_NW LOG_STREAM(err, network)
+#define LOG_CF LOG_STREAM(info, config)
+#define ERR_CF LOG_STREAM(err, config)
 
 namespace {
        const char* controller_names[] = {
Index: wesnoth/src/multiplayer_ui.cpp
diff -u wesnoth/src/multiplayer_ui.cpp:1.16 wesnoth/src/multiplayer_ui.cpp:1.17
--- wesnoth/src/multiplayer_ui.cpp:1.16 Wed Mar 23 22:10:50 2005
+++ wesnoth/src/multiplayer_ui.cpp      Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_ui.cpp,v 1.16 2005/03/23 22:10:50 ydirson Exp $ */
+/* $Id: multiplayer_ui.cpp,v 1.17 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -23,8 +23,8 @@
 #include "sound.hpp"
 #include "video.hpp"
 
-#define LOG_NW lg::info(lg::network)
-#define ERR_NW lg::err(lg::network)
+#define LOG_NW LOG_STREAM(info, network)
+#define ERR_NW LOG_STREAM(err, network)
 
 namespace mp {
 
Index: wesnoth/src/multiplayer_wait.cpp
diff -u wesnoth/src/multiplayer_wait.cpp:1.21 
wesnoth/src/multiplayer_wait.cpp:1.22
--- wesnoth/src/multiplayer_wait.cpp:1.21       Wed Mar 23 18:11:52 2005
+++ wesnoth/src/multiplayer_wait.cpp    Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_wait.cpp,v 1.21 2005/03/23 18:11:52 j_daniel Exp $ */
+/* $Id: multiplayer_wait.cpp,v 1.22 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -26,8 +26,8 @@
 #include "wml_separators.hpp"
 #include "serialization/string_utils.hpp"
 
-#define LOG_NW lg::info(lg::network)
-#define ERR_NW lg::err(lg::network)
+#define LOG_NW LOG_STREAM(info, network)
+#define ERR_NW LOG_STREAM(err, network)
 
 namespace {
 const SDL_Rect leader_pane_position = {-260,-370,260,370};
Index: wesnoth/src/network.cpp
diff -u wesnoth/src/network.cpp:1.59 wesnoth/src/network.cpp:1.60
--- wesnoth/src/network.cpp:1.59        Fri Mar 25 19:35:27 2005
+++ wesnoth/src/network.cpp     Sat Mar 26 17:10:32 2005
@@ -19,8 +19,8 @@
 
 #include <signal.h>
 
-#define LOG_NW lg::info(lg::network)
-#define WRN_NW lg::warn(lg::network)
+#define LOG_NW LOG_STREAM(info, network)
+#define WRN_NW LOG_STREAM(warn, network)
 // only warnings and not errors to avoid DoS by log flooding
 
 namespace {
@@ -168,7 +168,7 @@
 #endif
 
        if(SDLNet_Init() == -1) {
-               lg::err(lg::network) << "could not initialize SDLNet; throwing 
error...\n";
+               LOG_STREAM(err, network) << "could not initialize SDLNet; 
throwing error...\n";
                throw error(SDL_GetError());
        }
 
Index: wesnoth/src/network_worker.cpp
diff -u wesnoth/src/network_worker.cpp:1.26 wesnoth/src/network_worker.cpp:1.27
--- wesnoth/src/network_worker.cpp:1.26 Sat Mar 26 15:51:05 2005
+++ wesnoth/src/network_worker.cpp      Sat Mar 26 17:10:32 2005
@@ -13,7 +13,7 @@
 #include <map>
 #include <vector>
 
-#define LOG_NW lg::info(lg::network)
+#define LOG_NW LOG_STREAM(info, network)
 
 namespace {
 
Index: wesnoth/src/pathfind.cpp
diff -u wesnoth/src/pathfind.cpp:1.64 wesnoth/src/pathfind.cpp:1.65
--- wesnoth/src/pathfind.cpp:1.64       Tue Mar 22 23:42:36 2005
+++ wesnoth/src/pathfind.cpp    Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: pathfind.cpp,v 1.64 2005/03/22 23:42:36 ydirson Exp $ */
+/* $Id: pathfind.cpp,v 1.65 2005/03/26 17:10:32 silene Exp $ */
 /*
 Copyright (C) 2003 by David White <address@hidden>
 Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -25,7 +25,7 @@
 #include <cmath>
 #include <iostream>
 
-#define LOG_PF lg::info(lg::engine)
+#define LOG_PF LOG_STREAM(info, engine)
 
 typedef std::vector<gamemap::location> vector_location;
 typedef std::vector<a_star_node*> vector_a_star_node;
Index: wesnoth/src/playlevel.cpp
diff -u wesnoth/src/playlevel.cpp:1.195 wesnoth/src/playlevel.cpp:1.196
--- wesnoth/src/playlevel.cpp:1.195     Fri Mar 25 18:52:55 2005
+++ wesnoth/src/playlevel.cpp   Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: playlevel.cpp,v 1.195 2005/03/25 18:52:55 darthfool Exp $ */
+/* $Id: playlevel.cpp,v 1.196 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -47,7 +47,7 @@
 #include <iostream>
 #include <iterator>
 
-#define LOG_NG lg::info(lg::engine)
+#define LOG_NG LOG_STREAM(info, engine)
 
 namespace {
        int placing_score(const config& side, const gamemap& map, const 
gamemap::location& pos)
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.351 wesnoth/src/playturn.cpp:1.352
--- wesnoth/src/playturn.cpp:1.351      Fri Mar 25 18:52:55 2005
+++ wesnoth/src/playturn.cpp    Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.351 2005/03/25 18:52:55 darthfool Exp $ */
+/* $Id: playturn.cpp,v 1.352 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -489,7 +489,7 @@
                        if (m != NULL)
                                show_menu(m->items(),event.x,event.y,true);
                        else
-                               lg::warn(lg::display) << "no context menu 
found...\n";
+                               LOG_STREAM(warn, display) << "no context menu 
found...\n";
                }
        } else if(is_middle_click(event) && event.state == SDL_PRESSED) {
                // clicked on a hex on the minimap? then initiate minimap 
scrolling
@@ -998,7 +998,7 @@
 }
 
 void turn_info::start_interactive_turn() {
-       lg::info(lg::engine) << "done gotos\n";
+       LOG_STREAM(info, engine) << "done gotos\n";
        start_ncmd_ = recorder.ncommands();
 }
 
@@ -1346,7 +1346,7 @@
                player_info* const player = 
state_of_game_.get_player(teams_[team_num_-1].save_id());
 
                if(player == NULL) {
-                       lg::err(lg::engine) << "trying to undo a recall for 
side " << team_num_
+                       LOG_STREAM(err, engine) << "trying to undo a recall for 
side " << team_num_
                                << ", which has no recall list!\n";
                } else {
                        // Undo a recall action
@@ -1372,7 +1372,7 @@
                const unit_map::iterator u = units_.find(route.front());
                if(u == units_.end()) {
                        //this can actually happen if the scenario designer has 
abused the [allow_undo] command
-                       lg::err(lg::engine) << "Illegal 'undo' found. Possible 
abuse of [allow_undo]?\n";
+                       LOG_STREAM(err, engine) << "Illegal 'undo' found. 
Possible abuse of [allow_undo]?\n";
                        return;
                }
        
@@ -1434,7 +1434,7 @@
        if(action.is_recall()) {
                player_info 
*player=state_of_game_.get_player(teams_[team_num_-1].save_id());
                if(!player) {
-                       lg::err(lg::engine) << "trying to redo a recall for 
side " << team_num_
+                       LOG_STREAM(err, engine) << "trying to redo a recall for 
side " << team_num_
                                << ", which has no recall list!\n";
                } else {
                        // Redo recall
@@ -1765,7 +1765,7 @@
                const std::map<std::string,unit_type>::const_iterator
                                u_type = gameinfo_.unit_types.find(*it);
                if(u_type == gameinfo_.unit_types.end()) {
-                       lg::err(lg::engine) << "could not find unit '" << *it 
<< "'";
+                       LOG_STREAM(err, engine) << "could not find unit '" << 
*it << "'";
                        return;
                }
 
@@ -1924,7 +1924,7 @@
 
        player_info *player = 
state_of_game_.get_player(teams_[team_num_-1].save_id());
        if(!player) {
-               lg::err(lg::engine) << "cannot recall a unit for side " << 
team_num_
+               LOG_STREAM(err, engine) << "cannot recall a unit for side " << 
team_num_
                        << ", which has no recall list!\n";
                return;
        }
@@ -2675,7 +2675,7 @@
        if(cfg["side_drop"] != "") {
                const size_t side = atoi(cfg["side_drop"].c_str())-1;
                if(side >= teams_.size()) {
-                       lg::err(lg::network) << "unknown side " << side << " is 
dropping game\n";
+                       LOG_STREAM(err, network) << "unknown side " << side << 
" is dropping game\n";
                        throw network::error("");
                }
 
@@ -2805,7 +2805,7 @@
                do_command(textbox_.box->text());
                break;
        default:
-               lg::err(lg::display) << "unknown textbox mode\n";
+               LOG_STREAM(err, display) << "unknown textbox mode\n";
        }
 
        close_textbox();
@@ -2872,14 +2872,14 @@
                break;
        }
        default:
-               lg::err(lg::display) << "unknown textbox mode\n";
+               LOG_STREAM(err, display) << "unknown textbox mode\n";
        }
 }
 
 const unit_map& turn_info::visible_units() const
 {
        if(viewing_team().uses_shroud() == false && viewing_team().uses_fog() 
== false) {
-               lg::info(lg::engine) << "all units are visible...\n";
+               LOG_STREAM(info, engine) << "all units are visible...\n";
                return units_;
        }
 
@@ -2890,7 +2890,7 @@
                }
        }
 
-       lg::info(lg::engine) << "number of visible units: " << 
visible_units_.size() << "\n";
+       LOG_STREAM(info, engine) << "number of visible units: " << 
visible_units_.size() << "\n";
 
        return visible_units_;
 }
Index: wesnoth/src/replay.cpp
diff -u wesnoth/src/replay.cpp:1.99 wesnoth/src/replay.cpp:1.100
--- wesnoth/src/replay.cpp:1.99 Thu Mar 24 22:09:17 2005
+++ wesnoth/src/replay.cpp      Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: replay.cpp,v 1.99 2005/03/24 22:09:17 j_daniel Exp $ */
+/* $Id: replay.cpp,v 1.100 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -39,8 +39,8 @@
 #include <set>
 #include <sstream>
 
-#define LOG_NW lg::info(lg::network)
-#define ERR_NW lg::err(lg::network)
+#define LOG_NW LOG_STREAM(info, network)
+#define ERR_NW LOG_STREAM(err, network)
 
 //functions to verify that the unit structure on both machines is identical
 namespace {
Index: wesnoth/src/sdl_utils.cpp
diff -u wesnoth/src/sdl_utils.cpp:1.77 wesnoth/src/sdl_utils.cpp:1.78
--- wesnoth/src/sdl_utils.cpp:1.77      Wed Mar 23 21:30:46 2005
+++ wesnoth/src/sdl_utils.cpp   Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.cpp,v 1.77 2005/03/23 21:30:46 ydirson Exp $ */
+/* $Id: sdl_utils.cpp,v 1.78 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -25,7 +25,7 @@
 #include <iostream>
 #include <map>
 
-#define ERR_DP lg::err(lg::display)
+#define ERR_DP LOG_STREAM(err, display)
 
 SDLKey sdl_keysym_from_name(std::string const &keyname)
 {
Index: wesnoth/src/serialization/binary_wml.cpp
diff -u wesnoth/src/serialization/binary_wml.cpp:1.8 
wesnoth/src/serialization/binary_wml.cpp:1.9
--- wesnoth/src/serialization/binary_wml.cpp:1.8        Sat Mar 26 11:11:10 2005
+++ wesnoth/src/serialization/binary_wml.cpp    Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: binary_wml.cpp,v 1.8 2005/03/26 11:11:10 silene Exp $ */
+/* $Id: binary_wml.cpp,v 1.9 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -22,7 +22,7 @@
 #include <iostream>
 #include <sstream>
 
-#define ERR_CF lg::err(lg::config)
+#define ERR_CF LOG_STREAM(err, config)
 
 //data compression. Compression is designed for network traffic.
 //assumptions compression is based on:
Index: wesnoth/src/serialization/parser.cpp
diff -u wesnoth/src/serialization/parser.cpp:1.7 
wesnoth/src/serialization/parser.cpp:1.8
--- wesnoth/src/serialization/parser.cpp:1.7    Sat Mar 26 14:07:18 2005
+++ wesnoth/src/serialization/parser.cpp        Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: parser.cpp,v 1.7 2005/03/26 14:07:18 silene Exp $ */
+/* $Id: parser.cpp,v 1.8 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -30,9 +30,9 @@
 #include <sstream>
 #include <stack>
 
-#define ERR_CF lg::err(lg::config)
-#define WRN_CF lg::warn(lg::config)
-#define LOG_CF lg::info(lg::config)
+#define ERR_CF LOG_STREAM(err, config)
+#define WRN_CF LOG_STREAM(warn, config)
+#define LOG_CF LOG_STREAM(info, config)
 
 static const int max_recursion_levels = 100;
 
Index: wesnoth/src/serialization/preprocessor.cpp
diff -u wesnoth/src/serialization/preprocessor.cpp:1.6 
wesnoth/src/serialization/preprocessor.cpp:1.7
--- wesnoth/src/serialization/preprocessor.cpp:1.6      Sat Mar 26 14:07:18 2005
+++ wesnoth/src/serialization/preprocessor.cpp  Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: preprocessor.cpp,v 1.6 2005/03/26 14:07:18 silene Exp $ */
+/* $Id: preprocessor.cpp,v 1.7 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -25,8 +25,8 @@
 #include "serialization/preprocessor.hpp"
 #include "serialization/string_utils.hpp"
 
-#define ERR_CF lg::err(lg::config)
-#define LOG_CF lg::info(lg::config)
+#define ERR_CF LOG_STREAM(err, config)
+#define LOG_CF LOG_STREAM(info, config)
 
 bool preproc_define::operator==(preproc_define const &v) const {
        return value == v.value && arguments == v.arguments;
Index: wesnoth/src/serialization/string_utils.cpp
diff -u wesnoth/src/serialization/string_utils.cpp:1.12 
wesnoth/src/serialization/string_utils.cpp:1.13
--- wesnoth/src/serialization/string_utils.cpp:1.12     Sat Mar 26 15:32:26 2005
+++ wesnoth/src/serialization/string_utils.cpp  Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: string_utils.cpp,v 1.12 2005/03/26 15:32:26 silene Exp $ */
+/* $Id: string_utils.cpp,v 1.13 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -23,7 +23,7 @@
 #include "variable.hpp"
 #include "SDL_types.h"
 
-#define ERR_GENERAL lg::err(lg::general)
+#define ERR_GENERAL LOG_STREAM(err, general)
 
 namespace {
 
Index: wesnoth/src/show_dialog.cpp
diff -u wesnoth/src/show_dialog.cpp:1.119 wesnoth/src/show_dialog.cpp:1.120
--- wesnoth/src/show_dialog.cpp:1.119   Thu Mar 24 21:35:52 2005
+++ wesnoth/src/show_dialog.cpp Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: show_dialog.cpp,v 1.119 2005/03/24 21:35:52 ydirson Exp $ */
+/* $Id: show_dialog.cpp,v 1.120 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -43,9 +43,9 @@
 #include <iostream>
 #include <numeric>
 
-#define ERR_DP lg::err(lg::display)
-#define LOG_DP lg::info(lg::display)
-#define ERR_G  lg::err(lg::general)
+#define ERR_DP LOG_STREAM(err, display)
+#define LOG_DP LOG_STREAM(info, display)
+#define ERR_G  LOG_STREAM(err, general)
 
 namespace {
 bool is_in_dialog = false;
@@ -858,7 +858,7 @@
        if(res_ != 0)
                return CONNECTION_COMPLETE;
        else if(network::current_transfer_stats().first != stats_.first) {
-               lg::info(lg::network) << "continuing connection...\n";
+               LOG_STREAM(info, network) << "continuing connection...\n";
                return CONNECTION_CONTINUING;
        } else
                return CONTINUE_DIALOG;
Index: wesnoth/src/team.cpp
diff -u wesnoth/src/team.cpp:1.85 wesnoth/src/team.cpp:1.86
--- wesnoth/src/team.cpp:1.85   Tue Mar 22 23:42:37 2005
+++ wesnoth/src/team.cpp        Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: team.cpp,v 1.85 2005/03/22 23:42:37 ydirson Exp $ */
+/* $Id: team.cpp,v 1.86 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -27,7 +27,7 @@
 #include <cstdlib>
 #include <sstream>
 
-#define LOG_NG lg::info(lg::engine)
+#define LOG_NG LOG_STREAM(info, engine)
 
 namespace {
        std::vector<team>* teams = NULL;
Index: wesnoth/src/theme.cpp
diff -u wesnoth/src/theme.cpp:1.34 wesnoth/src/theme.cpp:1.35
--- wesnoth/src/theme.cpp:1.34  Fri Mar 25 18:52:55 2005
+++ wesnoth/src/theme.cpp       Sat Mar 26 17:10:32 2005
@@ -13,7 +13,7 @@
 #include <cstdlib>
 #include <sstream>
 
-#define LOG_DP lg::info(lg::display)
+#define LOG_DP LOG_STREAM(info, display)
 
 namespace {
        const SDL_Rect empty_rect = {0,0,0,0};
@@ -455,7 +455,7 @@
 
        if(current == resolutions.end()) {
                if(!resolutions.empty())
-                       lg::err(lg::display) << "No valid resolution found\n";
+                       LOG_STREAM(err, display) << "No valid resolution 
found\n";
                return false;
        }
 
Index: wesnoth/src/titlescreen.cpp
diff -u wesnoth/src/titlescreen.cpp:1.39 wesnoth/src/titlescreen.cpp:1.40
--- wesnoth/src/titlescreen.cpp:1.39    Fri Mar 25 18:19:20 2005
+++ wesnoth/src/titlescreen.cpp Sat Mar 26 17:10:32 2005
@@ -22,8 +22,8 @@
 
 #include "SDL_ttf.h"
 
-#define LOG_DP lg::info(lg::display)
-#define ERR_DP lg::err(lg::display)
+#define LOG_DP LOG_STREAM(info, display)
+#define ERR_DP LOG_STREAM(err, display)
 
 namespace {
 
Index: wesnoth/src/unit.cpp
diff -u wesnoth/src/unit.cpp:1.131 wesnoth/src/unit.cpp:1.132
--- wesnoth/src/unit.cpp:1.131  Tue Mar 22 23:42:37 2005
+++ wesnoth/src/unit.cpp        Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.cpp,v 1.131 2005/03/22 23:42:37 ydirson Exp $ */
+/* $Id: unit.cpp,v 1.132 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -31,7 +31,7 @@
 #include <iostream>
 #include <sstream>
 
-#define LOG_UT lg::info(lg::engine)
+#define LOG_UT LOG_STREAM(info, engine)
 
 namespace {
        const std::string ModificationTypes[] = { "object", "trait", "advance" 
};
Index: wesnoth/src/unit_display.cpp
diff -u wesnoth/src/unit_display.cpp:1.56 wesnoth/src/unit_display.cpp:1.57
--- wesnoth/src/unit_display.cpp:1.56   Wed Mar 23 22:10:50 2005
+++ wesnoth/src/unit_display.cpp        Sat Mar 26 17:10:32 2005
@@ -15,7 +15,7 @@
 #include "util.hpp"
 #include "wassert.hpp"
 
-#define LOG_DP lg::info(lg::display)
+#define LOG_DP LOG_STREAM(info, display)
 
 namespace
 {
@@ -126,7 +126,7 @@
                }
 
                if(image == NULL) {
-                       lg::err(lg::display) << "failed to get image " << 
u.type().image_moving() << "\n";
+                       LOG_STREAM(err, display) << "failed to get image " << 
u.type().image_moving() << "\n";
                        return;
                }
 
Index: wesnoth/src/unit_types.cpp
diff -u wesnoth/src/unit_types.cpp:1.93 wesnoth/src/unit_types.cpp:1.94
--- wesnoth/src/unit_types.cpp:1.93     Wed Mar 23 22:10:51 2005
+++ wesnoth/src/unit_types.cpp  Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: unit_types.cpp,v 1.93 2005/03/23 22:10:51 ydirson Exp $ */
+/* $Id: unit_types.cpp,v 1.94 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -380,7 +380,7 @@
 
        if(movement_costs != NULL) {
                if(underlying.size() != 1) {
-                       lg::err(lg::config) << "terrain '" << terrain << "' has 
" << underlying.size() << " underlying names - 0 expected\n";
+                       LOG_STREAM(err, config) << "terrain '" << terrain << "' 
has " << underlying.size() << " underlying names - 0 expected\n";
                        return impassable;
                }
 
@@ -439,7 +439,7 @@
 
        if(defense != NULL) {
                if(underlying.size() != 1) {
-                       lg::err(lg::config) << "terrain '" << terrain << "' has 
" << underlying.size() << " underlying names - 0 expected\n";
+                       LOG_STREAM(err, config) << "terrain '" << terrain << "' 
has " << underlying.size() << " underlying names - 0 expected\n";
                        return 100;
                }
 
@@ -630,7 +630,7 @@
        else if(align == "neutral")
                alignment_ = NEUTRAL;
        else {
-               lg::err(lg::config) << "Invalid alignment found for " << name() 
<< ": '" << align << "'\n";
+               LOG_STREAM(err, config) << "Invalid alignment found for " << 
name() << ": '" << align << "'\n";
                alignment_ = NEUTRAL;
        }
 
Index: wesnoth/src/video.cpp
diff -u wesnoth/src/video.cpp:1.62 wesnoth/src/video.cpp:1.63
--- wesnoth/src/video.cpp:1.62  Thu Mar 24 21:35:52 2005
+++ wesnoth/src/video.cpp       Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: video.cpp,v 1.62 2005/03/24 21:35:52 ydirson Exp $ */
+/* $Id: video.cpp,v 1.63 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -22,8 +22,8 @@
 #include "log.hpp"
 #include "video.hpp"
 
-#define LOG_DP lg::info(lg::display)
-#define ERR_DP lg::err(lg::display)
+#define LOG_DP LOG_STREAM(info, display)
+#define ERR_DP LOG_STREAM(err, display)
 
 #define TEST_VIDEO_ON 0
 
Index: wesnoth/src/wassert.cpp
diff -u wesnoth/src/wassert.cpp:1.2 wesnoth/src/wassert.cpp:1.3
--- wesnoth/src/wassert.cpp:1.2 Sun Jan  2 19:14:52 2005
+++ wesnoth/src/wassert.cpp     Sat Mar 26 17:10:32 2005
@@ -20,7 +20,7 @@
 {
        // crash if expression is false
        if(! expression) {
-               lg::err(lg::general) << "Assertion failure" << "\n";
+               LOG_STREAM(err, general) << "Assertion failure" << "\n";
                *reinterpret_cast<int*>(0) = 5;
        }
 }
Index: wesnoth/src/widgets/textbox.cpp
diff -u wesnoth/src/widgets/textbox.cpp:1.74 
wesnoth/src/widgets/textbox.cpp:1.75
--- wesnoth/src/widgets/textbox.cpp:1.74        Wed Mar 23 21:30:46 2005
+++ wesnoth/src/widgets/textbox.cpp     Sat Mar 26 17:10:32 2005
@@ -1,4 +1,4 @@
-/* $Id: textbox.cpp,v 1.74 2005/03/23 21:30:46 ydirson Exp $ */
+/* $Id: textbox.cpp,v 1.75 2005/03/26 17:10:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -341,7 +341,7 @@
        //Sanity check: verify that selection start and end are within text
        //boundaries
        if(is_selection() && !(size_t(selstart_) <= text_.size() && 
size_t(selend_) <= text_.size())) {
-               lg::warn(lg::display) << "out-of-boundary selection\n";
+               LOG_STREAM(warn, display) << "out-of-boundary selection\n";
                selstart_ = selend_ = -1;
        }
 
@@ -463,7 +463,7 @@
        if(!(c == SDLK_UP || c == SDLK_DOWN || c == SDLK_LEFT || c == 
SDLK_RIGHT ||
           c == SDLK_DELETE || c == SDLK_BACKSPACE || c == SDLK_END || c == 
SDLK_HOME)) {
                if(character != 0)
-                       lg::info(lg::display) << "Char: " << character << ", c 
= " << c << "\n";
+                       LOG_STREAM(info, display) << "Char: " << character << 
", c = " << c << "\n";
        
                if(event.key.keysym.mod & KMOD_CTRL) {
                        switch(c) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]