Sunny Srivastava | fa5e4d3 | 2023-03-12 11:59:49 -0500 | [diff] [blame^] | 1 | #include "logger.hpp" |
| 2 | |
| 3 | #include <sstream> |
| 4 | |
| 5 | namespace vpd |
| 6 | { |
| 7 | namespace logging |
| 8 | { |
| 9 | void logMessage(std::string_view message, const std::source_location& location) |
| 10 | { |
| 11 | std::ostringstream log; |
| 12 | log << "FileName: " << location.file_name() << "," |
| 13 | << " Line: " << location.line() << " " << message; |
| 14 | |
| 15 | /* TODO: Check on this later. |
| 16 | log << "FileName: " << location.file_name() << "," |
| 17 | << " Line: " << location.line() << "," |
| 18 | << " Func: " << location.function_name() << ", " << message;*/ |
| 19 | |
| 20 | std::cout << log.str() << std::endl; |
| 21 | } |
| 22 | } // namespace logging |
| 23 | } // namespace vpd |