Author: cazfi
Date: Thu Jun 23 03:44:23 2016
New Revision: 32974

URL: http://svn.gna.org/viewcvs/freeciv?rev=32974&view=rev
Log:
Defined log level macro LOG_BUILD_TARGET for logging production changes

See patch #7288

Modified:
    trunk/server/citytools.c
    trunk/server/citytools.h
    trunk/server/cityturn.c

Modified: trunk/server/citytools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/citytools.c?rev=32974&r1=32973&r2=32974&view=diff
==============================================================================
--- trunk/server/citytools.c    (original)
+++ trunk/server/citytools.c    Thu Jun 23 03:44:23 2016
@@ -2914,6 +2914,9 @@
       break;
   }
 
+  log_base(LOG_BUILD_TARGET, "%s started building %s%s.",
+           city_name_get(pcity), name, source);
+
   /* Tell the player what's up. */
   /* FIXME: this may give bad grammar when translated if the 'source'
    * string can have multiple values. */

Modified: trunk/server/citytools.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/citytools.h?rev=32974&r1=32973&r2=32974&view=diff
==============================================================================
--- trunk/server/citytools.h    (original)
+++ trunk/server/citytools.h    Thu Jun 23 03:44:23 2016
@@ -17,6 +17,8 @@
 #include "events.h"            /* enum event_type */
 #include "packets.h"
 #include "unitlist.h"
+
+#define LOG_BUILD_TARGET LOG_DEBUG
 
 #define SPECLIST_TAG traderoute_packet
 #define SPECLIST_TYPE struct packet_traderoute_info

Modified: trunk/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/cityturn.c?rev=32974&r1=32973&r2=32974&view=diff
==============================================================================
--- trunk/server/cityturn.c     (original)
+++ trunk/server/cityturn.c     Thu Jun 23 03:44:23 2016
@@ -2026,16 +2026,16 @@
     /* We can build a unit again unless it's unique or we have lost the tech. 
*/
     if (!utype_has_flag(pcity->production.value.utype, UTYF_UNIQUE)
         && can_city_build_unit_now(pcity, pcity->production.value.utype)) {
-      log_debug("%s repeats building %s", city_name_get(pcity),
-                utype_rule_name(pcity->production.value.utype));
+      log_base(LOG_BUILD_TARGET, "%s repeats building %s", 
city_name_get(pcity),
+               utype_rule_name(pcity->production.value.utype));
       return;
     }
     break;
   case VUT_IMPROVEMENT:
     if (can_city_build_improvement_now(pcity, 
pcity->production.value.building)) {
       /* We can build space and coinage again, and possibly others. */
-      log_debug("%s repeats building %s", city_name_get(pcity),
-                improvement_rule_name(pcity->production.value.building));
+      log_base(LOG_BUILD_TARGET, "%s repeats building %s", 
city_name_get(pcity),
+               improvement_rule_name(pcity->production.value.building));
       return;
     }
     break;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to