xref: /openbmc/openpower-vpd-parser/vpd-manager/src/logger.cpp (revision fa5e4d325ef9cea3c841fe89d202c340f92bd8c6)
1 #include "logger.hpp"
2 
3 #include <sstream>
4 
5 namespace vpd
6 {
7 namespace logging
8 {
logMessage(std::string_view message,const std::source_location & location)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
24