diff options
Diffstat (limited to 'server/src/templateparser.cc')
-rw-r--r-- | server/src/templateparser.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/server/src/templateparser.cc b/server/src/templateparser.cc index b3eda22..b34f280 100644 --- a/server/src/templateparser.cc +++ b/server/src/templateparser.cc @@ -54,7 +54,7 @@ void TemplateParser::error(const char* fmt, ...) va_start(argp, fmt); vasprintf(&p, fmt, argp); va_end(argp); - PRACRO_ERR_LOG(template, "Error in TemplateParser: %s\n", p); + ERR_LOG(template, "Error in TemplateParser: %s\n", p); throw Exception(std::string("Error in TemplateParser: ") + p); free(p); } @@ -67,7 +67,7 @@ TemplateParser::TemplateParser(std::string templatefile) file = templatefile; - PRACRO_DEBUG(template, "Using template file: %s\n", file.c_str()); + DEBUG(template, "Using template file: %s\n", file.c_str()); fd = open(file.c_str(), O_RDONLY); if(fd == -1) error("Could not open file %s", file.c_str()); @@ -128,12 +128,12 @@ void TemplateParser::endTag(std::string name) int TemplateParser::readData(char *data, size_t size) { if(fd == -1) { - PRACRO_ERR_LOG(template, "Invalid file descriptor.\n"); + ERR_LOG(template, "Invalid file descriptor.\n"); return 0; } ssize_t r = read(fd, data, size); if(r == -1) { - PRACRO_ERR_LOG(template, "Could not read...%s\n", strerror(errno)); + ERR_LOG(template, "Could not read...%s\n", strerror(errno)); return 0; } return r; @@ -141,7 +141,8 @@ int TemplateParser::readData(char *data, size_t size) void TemplateParser::parseError(const char *buf, size_t len, std::string error, int lineno) { - fprintf(stderr, "TemplateParser[%s] error at line %d: %s\n", file.c_str(), lineno, error.c_str()); + fprintf(stderr, "TemplateParser[%s] error at line %d: %s\n", + file.c_str(), lineno, error.c_str()); fprintf(stderr, "\tBuffer %u bytes: [", len); if(fwrite(buf, len, 1, stderr) != len) {} fprintf(stderr, "]\n"); |