C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
log.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2023 Intel Corporation
5
6 This software and the related documents are Intel copyrighted materials, and
7 your use of them is governed by the express license under which they were
8 provided to you ("License"). Unless the License provides otherwise, you may
9 not use, modify, copy, publish, distribute, disclose or transmit this software
10 or the related documents without Intel's prior written permission.
11
12 This software and the related documents are provided as is, with no express or
13 implied warranties, other than those that are expressly stated in the License.
14*/
15
16#ifndef SIMICS_LOG_H
17#define SIMICS_LOG_H
18
19#include <simics/base/log.h> // SIM_LOG_XXX
20
21#include <initializer_list>
22#include <string>
23
24namespace simics {
25
27using LogGroups = std::initializer_list<std::string>;
28
30#define SIM_LOG_INFO_STR(level, obj, group, str) \
31 SIM_LOG_INFO(level, obj, group, "%s", str.c_str())
32
33#define SIM_LOG_SPEC_VIOLATION_STR(level, obj, group, str) \
34 SIM_LOG_SPEC_VIOLATION(level, obj, group, "%s", str.c_str())
35
36#define SIM_LOG_UNIMPLEMENTED_STR(level, obj, group, str) \
37 SIM_LOG_UNIMPLEMENTED(level, obj, group, "%s", str.c_str())
38
39#define SIM_LOG_ERROR_STR(obj, group, str) \
40 SIM_LOG_ERROR(obj, group, "%s", str.c_str())
41
42#define SIM_LOG_CRITICAL_STR(obj, group, str) \
43 SIM_LOG_CRITICAL(obj, group, "%s", str.c_str())
44
45#define SIM_LOG_WARNING_STR(obj, group, str) \
46 SIM_LOG_WARNING(obj, group, "%s", str.c_str())
47
48} // namespace simics
49
50#endif
Definition: after-bank.h:33
std::initializer_list< std::string > LogGroups
Type used for log group names.
Definition: log.h:27