Logo AND Algorithmique Numérique Distribuée

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