file = fopen(global.stats_file, "r");
if (!file) {
- ha_warning("config: Can't load stats file: cannot open file.\n");
+ ha_warning("config: Can't load stats-file '%s': cannot open file.\n", global.stats_file);
return;
}
/* Generate stat columns map indexed by name. */
if (generate_stat_tree(&st_tree, stat_cols_px)) {
- ha_warning("config: Can't load stats file: not enough memory.\n");
+ ha_warning("config: Can't load stats-file '%s': not enough memory.\n", global.stats_file);
goto out;
}
line = malloc(sizeof(char) * LINESIZE);
if (!line) {
- ha_warning("config: Can't load stats file: line alloc error.\n");
+ ha_warning("config: Can't load stats-file '%s': line alloc error.\n", global.stats_file);
goto out;
}
if (*istptr(istline) == '#') {
if (parse_header_line(istline, &st_tree, &domain, cols)) {
if (!valid_format) {
- ha_warning("config: Invalid stats-file format.\n");
+ ha_warning("config: Invalid stats-file format in file '%s'.\n", global.stats_file);
break;
}
- ha_warning("config: Ignored stats-file header line '%d'.\n", linenum);
+ ha_warning("config: Ignored stats-file header line '%d' in file '%s'.\n", linenum, global.stats_file);
}
valid_format = 1;
}
else if (domain != STFILE_DOMAIN_UNSET) {
if (parse_stat_line(istline, domain, cols))
- ha_warning("config: Ignored stats-file line %d.\n", linenum);
+ ha_warning("config: Ignored stats-file line %d in file '%s'.\n", linenum, global.stats_file);
}
else {
/* Stop parsing if first line is not a valid header.
* Allows to immediately stop reading garbage file.
*/
if (!valid_format) {
- ha_warning("config: Invalid stats-file format.\n");
+ ha_warning("config: Invalid stats-file format in file '%s'.\n", global.stats_file);
break;
}
}