blob: a4160c1be71781692f01a5f50e9c5510f1ac8a19 [file] [log] [blame]
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -05001#pragma once
2
3#include <iostream>
4#include <source_location>
5#include <string_view>
6
7namespace vpd
8{
9/**
10 * @brief The namespace defines logging related methods for VPD.
11 */
12namespace 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 */
23void logMessage(std::string_view message, const std::source_location& location =
24 std::source_location::current());
25} // namespace logging
26} // namespace vpd