-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleLogger.cpp
More file actions
57 lines (49 loc) · 1.85 KB
/
Copy pathModuleLogger.cpp
File metadata and controls
57 lines (49 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Copyright (C) 2021-2026 Advanced Micro Devices, Inc. All rights reserved. */
#include <ModuleLogger.h>
using namespace DevDriver;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Forwards formatted log messages into the loader's log callback
void ModuleLogger::Vprintf(DD_LOG_LEVEL level, const char* pFmt, va_list args)
{
m_logger.Vprintf(DD_MAKE_LOG_EVENT(level, m_pLogCategory), pFmt, args);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ModuleLogger::Printf(DD_LOG_LEVEL level, const char* pFmt, ...)
{
va_list args;
va_start(args, pFmt);
Vprintf(level, pFmt, args);
va_end(args);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ModuleLogger::Error(const char* pFmt, ...)
{
va_list args;
va_start(args, pFmt);
Vprintf(DD_LOG_LEVEL_ERROR, pFmt, args);
va_end(args);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ModuleLogger::Warn(const char* pFmt, ...)
{
va_list args;
va_start(args, pFmt);
Vprintf(DD_LOG_LEVEL_WARN, pFmt, args);
va_end(args);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ModuleLogger::Info(const char* pFmt, ...)
{
va_list args;
va_start(args, pFmt);
Vprintf(DD_LOG_LEVEL_INFO, pFmt, args);
va_end(args);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ModuleLogger::Verbose(const char* pFmt, ...)
{
va_list args;
va_start(args, pFmt);
Vprintf(DD_LOG_LEVEL_VERBOSE, pFmt, args);
va_end(args);
}