Luna/libluna/include/luna/DebugLog.h

34 lines
918 B
C
Raw Permalink Normal View History

/**
* @file DebugLog.h
* @author apio (cloudapio.eu)
* @brief Debug logging for platform-agnostic functions.
*
* @copyright Copyright (c) 2022-2023, the Luna authors.
*
*/
2022-12-22 17:00:35 +00:00
#pragma once
#include <luna/Attributes.h>
#include <stdarg.h>
/**
* @brief The actual debug log implementation. This must be provided by the platform or user.
*
* In the kernel, the implementation is located in src/Log.cpp.
* For POSIX systems, libluna provides an implementation in src/ImplPOSIX.cpp.
*
* The printed message must be followed by an implicit newline.
*
* @param format The format string (in the style of printf).
* @param ap The variadic argument list.
*/
2022-12-22 17:00:35 +00:00
extern void debug_log_impl(const char* format, va_list ap);
/**
* @brief Log a formatted message.
*
* @param format The format string (in the style of printf).
* @param ... The format arguments.
*/
2023-01-02 12:07:29 +00:00
void dbgln(const char* format, ...) _format(1, 2);