Sunny Srivastava | fa5e4d3 | 2023-03-12 11:59:49 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <iostream> |
| 4 | #include <source_location> |
| 5 | #include <string_view> |
| 6 | |
| 7 | namespace vpd |
| 8 | { |
| 9 | /** |
| 10 | * @brief The namespace defines logging related methods for VPD. |
| 11 | */ |
| 12 | namespace logging |
| 13 | { |
| 14 | |
| 15 | /** |
| 16 | * @brief An api to log message. |
| 17 | * This API should be called to log message. It will auto append information |
| 18 | * like file name, line and function name to the message being logged. |
| 19 | * |
| 20 | * @param[in] message - Information that we want to log. |
| 21 | * @param[in] location - Object of source_location class. |
| 22 | */ |
| 23 | void logMessage(std::string_view message, const std::source_location& location = |
| 24 | std::source_location::current()); |
| 25 | } // namespace logging |
| 26 | } // namespace vpd |