GCCH_debug (struct CadetChannel *ch,
enum GNUNET_ErrorType level)
{
+#if !defined(GNUNET_CULL_LOGGING)
int do_log;
do_log = GNUNET_get_log_call_status (level & (~GNUNET_ERROR_TYPE_BULK),
ntohl (ch->mid_recv.mid),
(unsigned long long) ch->mid_futures,
ntohl (ch->mid_send.mid));
+#endif
}
GCC_debug (struct CadetConnection *cc,
enum GNUNET_ErrorType level)
{
+#if !defined(GNUNET_CULL_LOGGING)
int do_log;
do_log = GNUNET_get_log_call_status (level & (~GNUNET_ERROR_TYPE_BULK),
GCPP_2s (cc->path),
cc->state,
(GNUNET_YES == cc->mqm_ready) ? "ready" : "busy");
+#endif
}
-/* end of gnunet-service-cadet-new_connection.c */
+/* end of gnunet-service-cadet_connection.c */
GCT_debug (const struct CadetTunnel *t,
enum GNUNET_ErrorType level)
{
+#if !defined(GNUNET_CULL_LOGGING)
struct CadetTConnection *iter_c;
int do_log;
LOG2 (level,
"TTT TUNNEL END\n");
+#endif
}
-/* end of gnunet-service-cadet-new_tunnels.c */
+/* end of gnunet-service-cadet_tunnels.c */
update_tracker (struct GNUNET_BANDWIDTH_Tracker *av)
{
struct GNUNET_TIME_Absolute now;
- struct GNUNET_TIME_Relative delta;
uint64_t delta_time;
uint64_t delta_avail;
uint64_t left_bytes;
else
av->consumption_since_last_update__ = - max_carry;
}
- delta.rel_value_us = delta_time;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Tracker %p updated, consumption at %lld at %u Bps, last update was %s ago\n",
- av,
- (long long) av->consumption_since_last_update__,
- (unsigned int) av->available_bytes_per_s__,
- GNUNET_STRINGS_relative_time_to_string (delta,
- GNUNET_YES));
+#if !defined(GNUNET_CULL_LOGGING)
+ {
+ struct GNUNET_TIME_Relative delta;
+
+ delta.rel_value_us = delta_time;
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Tracker %p updated, consumption at %lld at %u Bps, last update was %s ago\n",
+ av,
+ (long long) av->consumption_since_last_update__,
+ (unsigned int) av->available_bytes_per_s__,
+ GNUNET_STRINGS_relative_time_to_string (delta,
+ GNUNET_YES));
+ }
+#endif
}
int force;
};
+
+#if !defined(GNUNET_CULL_LOGGING)
/**
* Dynamic array of logging definitions
*/
static int logdefs_len;
/**
- * GNUNET_YES if GNUNET_LOG environment variable is already parsed.
+ * #GNUNET_YES if GNUNET_LOG environment variable is already parsed.
*/
static int gnunet_log_parsed;
/**
- * GNUNET_YES if GNUNET_FORCE_LOG environment variable is already parsed.
+ * #GNUNET_YES if GNUNET_FORCE_LOG environment variable is already parsed.
*/
static int gnunet_force_log_parsed;
/**
- * GNUNET_YES if at least one definition with forced == 1 is available.
+ * #GNUNET_YES if at least one definition with forced == 1 is available.
*/
static int gnunet_force_log_present;
+#endif
#ifdef WINDOWS
/**
}
-#if !defined(GNUNET_CULL_LOGGING)
-/**
- * Utility function - reallocates logdefs array to be twice as large.
- */
-static void
-resize_logdefs ()
-{
- logdefs_size = (logdefs_size + 1) * 2;
- logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof (struct LogDef));
-}
-
-
/**
* Abort the process, generate a core dump if possible.
*/
}
+#if !defined(GNUNET_CULL_LOGGING)
+/**
+ * Utility function - reallocates logdefs array to be twice as large.
+ */
+static void
+resize_logdefs ()
+{
+ logdefs_size = (logdefs_size + 1) * 2;
+ logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof (struct LogDef));
+}
+
+
#if ! TALER_WALLET_ONLY
/**
* Rotate logs, deleting the oldest log.
log_file_name = GNUNET_STRINGS_filename_expand (logfile);
if (NULL == log_file_name)
return GNUNET_SYSERR;
-#if TALER_WALLET_ONLY
+#if TALER_WALLET_ONLY || defined(GNUNET_CULL_LOGGING)
/* log file option not allowed for wallet logic */
GNUNET_assert (NULL == logfile);
return GNUNET_OK;
}
#endif
VSNPRINTF (buf, size, message, va);
-#if ! TALER_WALLET_ONLY
+#if ! (defined(GNUNET_CULL_LOGGING) || TALER_WALLET_ONLY)
if (NULL != tmptr)
(void) setup_log_file (tmptr);
#endif
{
ec = errno;
LOG (GNUNET_ERROR_TYPE_ERROR,
- _("Could not acquire lock on file `%s': %s...\n"), filename,
+ _("Could not acquire lock on file `%s': %s...\n"),
+ filename,
STRERROR (ec));
}
}
{
ec = errno;
LOG (GNUNET_ERROR_TYPE_ERROR,
- _("Could not acquire lock on file `%s': %s...\n"), filename,
+ _("Could not acquire lock on file `%s': %s...\n"),
+ filename,
STRERROR (ec));
LOG (GNUNET_ERROR_TYPE_ERROR,
_
return;
}
ip = &msg[1];
+
+#if !defined(GNUNET_CULL_LOGGING)
{
char buf[INET6_ADDRSTRLEN];
buf,
sizeof (buf)));
}
+#endif
get_ip_as_string (client,
af,
ip);
}
else
{
+#if !defined(GNUNET_CULL_LOGGING)
char buf[INET6_ADDRSTRLEN];
LOG (GNUNET_ERROR_TYPE_INFO,
(const void *) &rh[1],
buf,
sizeof(buf)));
+#endif
if (GNUNET_NO == rh->received_response)
{
char *nret;
fflush (stdout);
}
+
+#if !defined(GNUNET_CULL_LOGGING)
static int
expensive_func ()
{
return GNUNET_NETWORK_socket_select (NULL, NULL, NULL, OUTPUT_DELAY);
}
+#endif
+
#define pr(kind,lvl) {\
struct GNUNET_TIME_Absolute t1, t2;\