yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10552
[Branch ~yade-pkg/yade/git-trunk] Rev 3831: Output some additional messages, when DEBUG mode is enabled.
------------------------------------------------------------
revno: 3831
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2014-02-28 12:14:59 +0100
message:
Output some additional messages, when DEBUG mode is enabled.
modified:
lib/base/Logging.hpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'lib/base/Logging.hpp'
--- lib/base/Logging.hpp 2012-04-13 16:27:00 +0000
+++ lib/base/Logging.hpp 2014-02-28 11:14:59 +0000
@@ -16,9 +16,18 @@
# define _POOR_MANS_LOG(level,msg) {std::cerr<<level " "<<_LOG_HEAD<<msg<<std::endl;}
# define _LOG_HEAD __FILE__ ":"<<__LINE__<<" "<<__FUNCTION__<<": "
-# define LOG_TRACE(msg) // _POOR_MANS_LOG("TRACE",msg)
-# define LOG_DEBUG(msg) // _POOR_MANS_LOG("DEBUG",msg)
-# define LOG_INFO(msg) // _POOR_MANS_LOG("INFO ",msg)
+
+#ifdef YADE_DEBUG
+ # define LOG_TRACE(msg) _POOR_MANS_LOG("TRACE",msg)
+ # define LOG_INFO(msg) _POOR_MANS_LOG("INFO ",msg)
+ # define LOG_DEBUG(msg) _POOR_MANS_LOG("DEBUG",msg)
+#else
+ # define LOG_TRACE(msg) // _POOR_MANS_LOG("TRACE",msg)
+ # define LOG_INFO(msg) // _POOR_MANS_LOG("INFO ",msg)
+ # define LOG_DEBUG(msg) // _POOR_MANS_LOG("DEBUG",msg)
+#endif
+
+
# define LOG_WARN(msg) _POOR_MANS_LOG("WARN ",msg)
# define LOG_ERROR(msg) _POOR_MANS_LOG("ERROR",msg)
# define LOG_FATAL(msg) _POOR_MANS_LOG("FATAL",msg)