parse_var_name,
parse_var_content,
} state = parse_str;
+ gint braces = 0;
g_assert (cfg != NULL);
c = cfg->log_format_str;
p ++;
c = p;
state = parse_var_content;
+ braces = 1;
}
else if (*p != '_' && *p != '-' && !g_ascii_isalnum (*p)) {
/* Variable with no content */
}
break;
case parse_var_content:
- if (*p == '}') {
+ if (*p == '}' && --braces == 0) {
var_content.begin = c;
var_content.len = p - c;
p ++;
state = parse_str;
}
+ else if (*p == '{') {
+ braces ++;
+ p ++;
+ }
else {
p++;
}