82#ifndef PACS_INTEGRATION_QUERY_LEVEL_DEFINED
83#define PACS_INTEGRATION_QUERY_LEVEL_DEFINED
225 template <
typename... Args>
236 template <
typename... Args>
247 template <
typename... Args>
258 template <
typename... Args>
269 template <
typename... Args>
280 template <
typename... Args>
290 static void log(
log_level level,
const std::string& message);
319 const std::string& called_ae,
320 const std::string& remote_ip);
331 const std::string& called_ae);
346 const std::string& patient_id,
347 const std::string& study_uid,
348 const std::string& sop_instance_uid,
362 std::size_t matches_returned);
376 const std::string& destination_ae,
377 const std::string& study_uid,
378 std::size_t instances_moved,
391 const std::string& description,
392 const std::string& user_id =
"");
419 const std::
string& outcome,
420 const std::map<std::
string, std::
string>& fields);
Adapter for DICOM audit logging using logger_system.
static std::unique_ptr< impl > pimpl_
static void flush()
Flush all pending log messages.
static void trace(kcenon::pacs::compat::format_string< Args... > fmt, Args &&... args)
Log a trace-level message.
static void log_c_find_executed(const std::string &calling_ae, query_level level, std::size_t matches_returned)
Log C-FIND operation.
static void log_security_event(security_event_type type, const std::string &description, const std::string &user_id="")
Log a security-related event.
static void write_audit_log(const std::string &event_type, const std::string &outcome, const std::map< std::string, std::string > &fields)
static void log_c_store_received(const std::string &calling_ae, const std::string &patient_id, const std::string &study_uid, const std::string &sop_instance_uid, storage_status status)
Log C-STORE operation.
static void log_association_released(const std::string &calling_ae, const std::string &called_ae)
Log DICOM association release.
static void log_c_move_executed(const std::string &calling_ae, const std::string &destination_ae, const std::string &study_uid, std::size_t instances_moved, move_status status)
Log C-MOVE operation.
static void shutdown()
Shutdown the logger.
static auto security_event_to_string(security_event_type type) -> std::string
static void log(log_level level, const std::string &message)
Log a message at the specified level.
static auto get_config() -> const logger_config &
Get the current configuration.
static void debug(kcenon::pacs::compat::format_string< Args... > fmt, Args &&... args)
Log a debug-level message.
static auto log_level_to_string(log_level level) -> std::string
static auto storage_status_to_string(storage_status status) -> std::string
static void info(kcenon::pacs::compat::format_string< Args... > fmt, Args &&... args)
Log an info-level message.
static void warn(kcenon::pacs::compat::format_string< Args... > fmt, Args &&... args)
Log a warning-level message.
static auto is_level_enabled(log_level level) noexcept -> bool
Check if a log level is enabled.
static void set_min_level(log_level level)
Set the minimum log level.
static void error(kcenon::pacs::compat::format_string< Args... > fmt, Args &&... args)
Log an error-level message.
static void fatal(kcenon::pacs::compat::format_string< Args... > fmt, Args &&... args)
Log a fatal-level message.
static auto move_status_to_string(move_status status) -> std::string
static auto is_initialized() noexcept -> bool
Check if the logger is initialized.
static void initialize(const logger_config &config)
Initialize the logger with configuration.
static auto get_min_level() noexcept -> log_level
Get the current minimum log level.
static void log_association_established(const std::string &calling_ae, const std::string &called_ae, const std::string &remote_ip)
Log DICOM association establishment.
static auto query_level_to_string(query_level level) -> std::string
std::format_string< Args... > format_string
storage_status
Status of DICOM C-STORE operations.
security_event_type
Types of security events for audit logging.
log_level
Log severity levels.
query_level
DICOM query retrieve level.
move_status
Status of DICOM C-MOVE operations.
@ identifier_does_not_match
@ refused_move_destination_unknown
@ refused_out_of_resources
Configuration options for the logger adapter.
bool async_mode
Use asynchronous logging for better performance.
std::string audit_log_format
Audit log format: "json" or "syslog".
std::size_t max_files
Maximum number of rotated log files to keep.
bool enable_audit_log
Enable separate audit trail file for HIPAA compliance.
std::size_t max_file_size_mb
Maximum log file size in megabytes before rotation.
bool enable_console
Enable console output.
bool enable_file
Enable file output.
log_level min_level
Minimum log level to output.
std::size_t buffer_size
Buffer size for async logging.
std::filesystem::path log_directory
Directory for log files.