diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-12 09:22:15 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-12 09:22:15 +0000 |
commit | 61fb942d84db31829ff44f85f935429f31018b2b (patch) | |
tree | a393b32f0d1d0b3a9a80646d75b6b4dfa79fdd94 /src/transport/test_transport_api.c | |
parent | a2d65ae7441ac4739cca83b77c3e1af998dac83e (diff) | |
download | gnunet-61fb942d84db31829ff44f85f935429f31018b2b.tar.gz gnunet-61fb942d84db31829ff44f85f935429f31018b2b.zip |
better logging since important messages are info
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r-- | src/transport/test_transport_api.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 774bdd540..0934f681c 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -80,7 +80,7 @@ static char *cfg_file_p2; | |||
80 | static void | 80 | static void |
81 | end () | 81 | end () |
82 | { | 82 | { |
83 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 83 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stopping peers\n"); |
84 | 84 | ||
85 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 85 | if (send_task != GNUNET_SCHEDULER_NO_TASK) |
86 | GNUNET_SCHEDULER_cancel (send_task); | 86 | GNUNET_SCHEDULER_cancel (send_task); |
@@ -101,7 +101,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
101 | { | 101 | { |
102 | die_task = GNUNET_SCHEDULER_NO_TASK; | 102 | die_task = GNUNET_SCHEDULER_NO_TASK; |
103 | 103 | ||
104 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 104 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); |
105 | 105 | ||
106 | 106 | ||
107 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 107 | if (send_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -164,7 +164,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
164 | 164 | ||
165 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); | 165 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
166 | 166 | ||
167 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 167 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
168 | "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", | 168 | "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", |
169 | p->no, ps, ntohs (message->type), ntohs (message->size), t->no, | 169 | p->no, ps, ntohs (message->type), ntohs (message->size), t->no, |
170 | GNUNET_i2s (&t->id)); | 170 | GNUNET_i2s (&t->id)); |
@@ -214,7 +214,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
214 | } | 214 | } |
215 | 215 | ||
216 | char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); | 216 | char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); |
217 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 217 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
218 | "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", | 218 | "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", |
219 | p2->no, ps, ntohs (hdr->type), ntohs (hdr->size), p->no, | 219 | p2->no, ps, ntohs (hdr->type), ntohs (hdr->size), p->no, |
220 | GNUNET_i2s (&p->id)); | 220 | GNUNET_i2s (&p->id)); |
@@ -233,7 +233,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
233 | return; | 233 | return; |
234 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 234 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
235 | 235 | ||
236 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 236 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
237 | "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", | 237 | "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", |
238 | p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); | 238 | p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); |
239 | GNUNET_free (receiver_s); | 239 | GNUNET_free (receiver_s); |
@@ -261,7 +261,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
261 | 261 | ||
262 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); | 262 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
263 | 263 | ||
264 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 264 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
265 | "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, | 265 | "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, |
266 | t->no, GNUNET_i2s (peer)); | 266 | t->no, GNUNET_i2s (peer)); |
267 | GNUNET_free (ps); | 267 | GNUNET_free (ps); |
@@ -274,7 +274,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
274 | struct PeerContext *p = cls; | 274 | struct PeerContext *p = cls; |
275 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); | 275 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
276 | 276 | ||
277 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 277 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
278 | "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, | 278 | "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, |
279 | GNUNET_i2s (peer)); | 279 | GNUNET_i2s (peer)); |
280 | 280 | ||
@@ -292,7 +292,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
292 | cc = NULL; | 292 | cc = NULL; |
293 | char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 293 | char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
294 | 294 | ||
295 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", | 295 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peers connected: %u (%s) <-> %u (%s)\n", |
296 | p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); | 296 | p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); |
297 | GNUNET_free (p1_c); | 297 | GNUNET_free (p1_c); |
298 | 298 | ||
@@ -308,7 +308,7 @@ start_cb (struct PeerContext *p, void *cls) | |||
308 | 308 | ||
309 | started++; | 309 | started++; |
310 | 310 | ||
311 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%s') started\n", p->no, | 311 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer %u (`%s') started\n", p->no, |
312 | GNUNET_i2s (&p->id)); | 312 | GNUNET_i2s (&p->id)); |
313 | 313 | ||
314 | if (started != 2) | 314 | if (started != 2) |
@@ -317,7 +317,7 @@ start_cb (struct PeerContext *p, void *cls) | |||
317 | s_started = GNUNET_YES; | 317 | s_started = GNUNET_YES; |
318 | char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); | 318 | char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
319 | 319 | ||
320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 320 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
321 | "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", | 321 | "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", |
322 | p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); | 322 | p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); |
323 | GNUNET_free (sender_c); | 323 | GNUNET_free (sender_c); |