retinify 0.2.0
Real-Time AI Stereo Vision Library
Loading...
Searching...
No Matches
logging.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2025 Sensui Yagi. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4#pragma once
5
7#include "retinify/status.hpp"
8
9#include <cstdint>
10#include <source_location>
11
12namespace retinify
13{
16enum class LogLevel : std::uint8_t
17{
19 DEBUG,
21 INFO,
23 WARN,
25 ERROR,
27 FATAL,
29 OFF,
30};
31
37
42RETINIFY_API void SetLogLevel(LogLevel level) noexcept;
43
50RETINIFY_API void LogDebug(const char *message, std::source_location location = std::source_location::current()) noexcept;
51
58RETINIFY_API void LogInfo(const char *message, std::source_location location = std::source_location::current()) noexcept;
59
66RETINIFY_API void LogWarn(const char *message, std::source_location location = std::source_location::current()) noexcept;
67
74RETINIFY_API void LogError(const char *message, std::source_location location = std::source_location::current()) noexcept;
75
82RETINIFY_API void LogFatal(const char *message, std::source_location location = std::source_location::current()) noexcept;
83} // namespace retinify
#define RETINIFY_API
Defines a macro for setting API visibility to "default" for the retinify library.
Definition attributes.hpp:8
Definition colormap.hpp:13
RETINIFY_API void LogInfo(const char *message, std::source_location location=std::source_location::current()) noexcept
Logs an informational message.
RETINIFY_API void SetLogLevel(LogLevel level) noexcept
Sets the log level.
RETINIFY_API auto GetLogLevel() noexcept -> LogLevel
Returns the current log level.
RETINIFY_API void LogError(const char *message, std::source_location location=std::source_location::current()) noexcept
Logs an error message.
RETINIFY_API void LogWarn(const char *message, std::source_location location=std::source_location::current()) noexcept
Logs a warning message.
RETINIFY_API void LogFatal(const char *message, std::source_location location=std::source_location::current()) noexcept
Logs a fatal error message.
RETINIFY_API void LogDebug(const char *message, std::source_location location=std::source_location::current()) noexcept
Logs a debug message.
LogLevel
Logging verbosity levels for retinify.
Definition logging.hpp:17
@ FATAL
Fatal Error messages.
@ WARN
Warning messages.
@ INFO
Informational messages.
@ OFF
Disable all logging.
@ ERROR
Error messages.
@ DEBUG
Debug messages.