Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Renamed any gras stuff that was in xbt and should therefore be called
[simgrid.git] / testsuite / xbt / log_usage.c
1 /* $Id$ */
2
3 /* log_usage - A test of normal usage of the log facilities                 */
4
5 /* Authors: Martin Quinson                                                  */
6 /* Copyright (C) 2004 the OURAGAN project.                                  */
7
8 /* This program is free software; you can redistribute it and/or modify it
9    under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #include <gras.h>
12 #include <stdio.h>
13
14 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(test, top,"Logging specific to this test");
15 XBT_LOG_NEW_CATEGORY(top,"Useless test channel");
16
17 int main(int argc, char **argv) {
18   xbt_init_defaultlog(&argc,argv,"root.thresh=debug log.thresh=debug");
19
20   DEBUG1("val=%d", 1);
21   WARN1("val=%d", 2);
22   CDEBUG2(top, "val=%d%s", 3, "!");
23   CRITICAL6("false alarm%s%s%s%s%s%s", "","","","","","!");
24   
25   xbt_exit();
26   return 0;
27 }