1 /* log_usage - A test of normal usage of the log facilities */
3 /* Copyright (c) 2004-2022. The SimGrid Team.
4 * All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include <simgrid/engine.h>
12 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(test, top, "Logging specific to this test");
13 XBT_LOG_NEW_CATEGORY(top, "Useless test channel");
15 static void dolog(const char *settings)
17 XBT_INFO("Test with the settings '%s'", settings);
18 xbt_log_control_set(settings);
19 XBT_DEBUG("val=%d", 1);
20 XBT_WARN("val=%d", 2);
21 XBT_CDEBUG(top, "val=%d%s", 3, "!");
22 XBT_CRITICAL("false alarm%s%s%s%s%s%s", "", "", "", "", "", "!");
25 int main(int argc, char **argv)
27 simgrid_init(&argc, argv);
31 dolog(" test.thres:info root.thres:info ");
33 dolog(" test.thres:debug ");
35 dolog(" test.thres:verbose root.thres:error ");
36 dolog(" test.thres:critical ");