diff --git a/include/anthem/Body.h b/include/anthem/Body.h index 367005c..169b2b3 100644 --- a/include/anthem/Body.h +++ b/include/anthem/Body.h @@ -90,7 +90,7 @@ struct TermPrintVisitor outputStream << " " << Clingo::AST::BinaryOperator::And << " "; if (literal.sign == Clingo::AST::Sign::Negation) - std::cout << Clingo::AST::Sign::Negation << " "; + outputStream << Clingo::AST::Sign::Negation << " "; outputStream << output::Function(function.name) << "("; diff --git a/include/anthem/StatementVisitor.h b/include/anthem/StatementVisitor.h index f198cc4..0516769 100644 --- a/include/anthem/StatementVisitor.h +++ b/include/anthem/StatementVisitor.h @@ -19,7 +19,8 @@ struct StatementVisitor { void visit(const Clingo::AST::Program &program, const Clingo::AST::Statement &statement, Context &context) { - context.logger.log(output::Priority::Debug, program.name); + // TODO: refactor + context.logger.log(output::Priority::Debug, (std::string("[program] ") + program.name).c_str()); if (!program.parameters.empty()) throwErrorAtLocation(statement.location, "program parameters currently unsupported", context); diff --git a/src/anthem/Translation.cpp b/src/anthem/Translation.cpp index 87b8cb6..5723768 100644 --- a/src/anthem/Translation.cpp +++ b/src/anthem/Translation.cpp @@ -32,7 +32,8 @@ void translate(const std::vector &fileNames, Context &context) void translate(const char *fileName, std::istream &stream, Context &context) { - std::cout << "info: reading " << fileName << std::endl; + // TODO: refactor + context.logger.log(output::Priority::Note, (std::string("reading ") + fileName).c_str()); auto fileContent = std::string(std::istreambuf_iterator(stream), {});