DiCE API nvidia_logo_transpbg.gif Up
ilogging_configuration.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_ILOGGING_CONFIGURATION_H
8#define MI_NEURAYLIB_ILOGGING_CONFIGURATION_H
9
10#include <mi/base/enums.h>
12
13namespace mi {
14
15namespace base { class ILogger; }
16
17namespace neuraylib {
18
25 LOG_PREFIX_TIME = 0x0001,
33 LOG_PREFIX_TAGS = 0x0100,
34 LOG_PREFIX_FORCE_32_BIT = 0xffffffffU
35};
36
37mi_static_assert( sizeof( Log_prefix) == sizeof( Uint32));
38
67 mi::base::Interface_declare<0xaf42fbf7,0xa7da,0x4f35,0xa7,0xcb,0xbe,0xb5,0xcc,0x11,0x3d,0x7c>
68{
69public:
80 virtual void set_receiving_logger( base::ILogger* logger) = 0;
81
90 virtual base::ILogger* get_receiving_logger() const = 0;
91
96
106
113
126 const char* category,
127 base::Message_severity level) = 0;
128
136 virtual base::Message_severity get_log_level_by_category( const char* category) const = 0;
137
149 virtual Sint32 set_log_priority( Sint32 priority) = 0;
150
152 virtual Sint32 get_log_priority() const = 0;
153
161 virtual void set_log_prefix( Uint32 prefix) = 0;
162
167 virtual Uint32 get_log_prefix() const = 0;
168
179 virtual Sint32 set_log_locally( bool value) = 0;
180
182 virtual bool get_log_locally() const = 0;
183};
184 // end group mi_neuray_configuration
186
187} // namespace neuraylib
188
189} // namespace mi
190
191#endif // MI_NEURAYLIB_ILOGGING_CONFIGURATION_H
The ILogger interface class supports logging of messages.
Definition: ilogger.h:194
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
This interface is used for configuring the logging for the DiCE library.
Definition: ilogging_configuration.h:68
virtual void set_receiving_logger(base::ILogger *logger)=0
Sets the receiving logger.
virtual Sint32 set_log_level(base::Message_severity level)=0
Sets the overall logging level of this host.
virtual void set_log_prefix(Uint32 prefix)=0
Sets the log message prefix.
virtual Sint32 set_log_locally(bool value)=0
Enables or disables local logging.
virtual Sint32 set_log_priority(Sint32 priority)=0
Sets the logging priority of this host.
virtual base::Message_severity get_log_level() const =0
Returns the overall logging level of this host.
virtual Sint32 set_log_level_by_category(const char *category, base::Message_severity level)=0
Sets the logging level of this host for a particular message category.
virtual bool get_log_locally() const =0
Indicates whether local logging is enabled or not.
virtual base::ILogger * get_forwarding_logger() const =0
Returns the forwarding logger.
virtual Sint32 get_log_priority() const =0
Returns the logging priority of this host.
virtual Uint32 get_log_prefix() const =0
Returns the log message prefix.
virtual base::Message_severity get_log_level_by_category(const char *category) const =0
Returns the logging level of this host for a particular message category.
virtual base::ILogger * get_receiving_logger() const =0
Returns the receiving logger.
Basic enums.
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:65
Message_severity
Constants for possible message severities.
Definition: enums.h:31
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Log_prefix
Components of the log message prefix.
Definition: ilogging_configuration.h:24
@ LOG_PREFIX_SEVERITY
severity of the log message
Definition: ilogging_configuration.h:31
@ LOG_PREFIX_CUDA_DEVICE
CUDA device (if relevant)
Definition: ilogging_configuration.h:32
@ LOG_PREFIX_TAGS
message detail tags
Definition: ilogging_configuration.h:33
@ LOG_PREFIX_HOST_THREAD
ID of the host and thread that generate the log message.
Definition: ilogging_configuration.h:27
@ LOG_PREFIX_HOST_NAME
name of the host that generates the log message
Definition: ilogging_configuration.h:28
@ LOG_PREFIX_TIME_SECONDS
timestamp in seconds with milliseconds resolution
Definition: ilogging_configuration.h:26
@ LOG_PREFIX_MODULE
module that generates the log message
Definition: ilogging_configuration.h:29
@ LOG_PREFIX_CATEGORY
category of the log message
Definition: ilogging_configuration.h:30
@ LOG_PREFIX_TIME
human-readable timestamp
Definition: ilogging_configuration.h:25
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: dice.h:89