retinify 0.1.7
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{
36};
37
43
48RETINIFY_API auto SetLogLevel(LogLevel level) noexcept -> void;
49
52enum class LogLocation : std::uint8_t
53{
60};
61
67
72RETINIFY_API auto SetLogLocation(LogLocation location) noexcept -> void;
73
80RETINIFY_API auto LogDebug(const char *message, std::source_location location = std::source_location::current()) noexcept -> void;
81
88RETINIFY_API auto LogInfo(const char *message, std::source_location location = std::source_location::current()) noexcept -> void;
89
96RETINIFY_API auto LogWarn(const char *message, std::source_location location = std::source_location::current()) noexcept -> void;
97
104RETINIFY_API auto LogError(const char *message, std::source_location location = std::source_location::current()) noexcept -> void;
105
112RETINIFY_API auto LogFatal(const char *message, std::source_location location = std::source_location::current()) noexcept -> void;
113
118RETINIFY_API auto LogSoftwareInfo(std::source_location location = std::source_location::current()) noexcept -> void;
119
128RETINIFY_API auto LogStrideError(std::size_t providedStride, std::size_t requiredStride, std::source_location location = std::source_location::current()) noexcept -> void;
129} // 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 auto LogWarn(const char *message, std::source_location location=std::source_location::current()) noexcept -> void
Logs a warning message.
RETINIFY_API auto LogDebug(const char *message, std::source_location location=std::source_location::current()) noexcept -> void
Logs a debug message.
RETINIFY_API auto GetLogLocation() noexcept -> LogLocation
Returns the current log location setting.
RETINIFY_API auto LogStrideError(std::size_t providedStride, std::size_t requiredStride, std::source_location location=std::source_location::current()) noexcept -> void
Logs an error indicating that the provided stride is smaller than the required stride.
LogLocation
Logging source location options.
Definition logging.hpp:53
@ FUNCTION
Function name.
Definition logging.hpp:59
@ NONE
No source location.
Definition logging.hpp:56
RETINIFY_API auto SetLogLocation(LogLocation location) noexcept -> void
Sets the log location setting.
RETINIFY_API auto GetLogLevel() noexcept -> LogLevel
Returns the current log level.
RETINIFY_API auto LogFatal(const char *message, std::source_location location=std::source_location::current()) noexcept -> void
Logs a fatal error message.
RETINIFY_API auto LogSoftwareInfo(std::source_location location=std::source_location::current()) noexcept -> void
Logs basic information about the retinify library.
RETINIFY_API auto LogInfo(const char *message, std::source_location location=std::source_location::current()) noexcept -> void
Logs an informational message.
RETINIFY_API auto SetLogLevel(LogLevel level) noexcept -> void
Sets the log level.
LogLevel
Logging verbosity levels.
Definition logging.hpp:17
@ FATAL
Fatal Error messages.
Definition logging.hpp:32
@ WARN
Warning messages.
Definition logging.hpp:26
@ INFO
Informational messages.
Definition logging.hpp:23
@ OFF
Disable all logging.
Definition logging.hpp:35
@ ERROR
Error messages.
Definition logging.hpp:29
@ DEBUG
Debug messages.
Definition logging.hpp:20
RETINIFY_API auto LogError(const char *message, std::source_location location=std::source_location::current()) noexcept -> void
Logs an error message.