diff --git a/src/message.h b/src/message.h index e0cd6f46fc589c03e0936eade6458daa923aeac4..aafadbd11170ed4eb15c180ad6db18a43deeb699 100644 --- a/src/message.h +++ b/src/message.h @@ -6,18 +6,24 @@ #define PROJECT_MESSAGE_H #include <cassert> +#include <iomanip> + +#define COL_WIDTH 20 +#define R_ALIGN std::setw(COL_WIDTH) << std::right #define COUT_INFO(inp) std::cout << std::flush << "INFO: " << inp << std::flush #ifdef L4N_DEBUG -#define COUT_DEBUG(inp) assert(std::cerr << std::flush << "DEBUG: " << inp << std::flush) +#define COUT_DEBUG(inp) assert(std::cerr << std::flush << std::fixed << std::setprecision(6) << "DEBUG: " << inp << std::flush) #define WRITE_TO_OFS_DEBUG(ofs, msg) { if(ofs && ofs->is_open())\ - *ofs << "DEBUG: " << msg;\ + *ofs << std::fixed << std::setprecision(6) << "DEBUG: " << msg;\ } #else #define COUT_DEBUG(inp) #define WRITE_TO_OFS_DEBUG(ofs, msg) #endif // L4N_DEBUG + + #endif //PROJECT_MESSAGE_H