+static void _xbt_log_cat_apply_set(xbt_log_category_t category,
+ xbt_log_setting_t setting) {
+
+ s_xbt_log_event_t _log_ev;
+
+ if (setting->thresh != xbt_log_priority_uninitialized) {
+ xbt_log_threshold_set(category, setting->thresh);
+
+ if (category->threshold <= xbt_log_priority_debug) {
+ _log_ev.cat = category;
+ _log_ev.priority = xbt_log_priority_debug;
+ _log_ev.fileName = __FILE__ ;
+ _log_ev.functionName = _XBT_FUNCTION ;
+ _log_ev.lineNum = __LINE__ ;
+
+ _xbt_log_event_log(&_log_ev,
+ "Apply settings for category '%s': set threshold to %s (=%d)",
+ category->name,
+ xbt_log_priority_names[category->threshold],
+ category->threshold);
+ }
+ }
+
+ if (setting->fmt) {
+ xbt_log_layout_set(category,xbt_log_layout_format_new(setting->fmt));
+
+ if (category->threshold <= xbt_log_priority_debug) {
+ _log_ev.cat = category;
+ _log_ev.priority = xbt_log_priority_debug;
+ _log_ev.fileName = __FILE__ ;
+ _log_ev.functionName = _XBT_FUNCTION ;
+ _log_ev.lineNum = __LINE__ ;
+
+ _xbt_log_event_log(&_log_ev,
+ "Apply settings for category '%s': set format to %s",
+ category->name,
+ setting->fmt);
+ }
+ }
+
+ if (setting->additivity != -1) {
+ xbt_log_additivity_set(category,setting->additivity);
+
+ if (category->threshold <= xbt_log_priority_debug) {
+ _log_ev.cat = category;
+ _log_ev.priority = xbt_log_priority_debug;
+ _log_ev.fileName = __FILE__ ;
+ _log_ev.functionName = _XBT_FUNCTION ;
+ _log_ev.lineNum = __LINE__ ;
+
+ _xbt_log_event_log(&_log_ev,
+ "Apply settings for category '%s': set additivity to %s",
+ category->name,
+ (setting->additivity?"on":"off"));
+ }
+ }
+}