7#ifndef FGF_COM_LOGGER_HPP_H_
8#define FGF_COM_LOGGER_HPP_H_
10#include <fmt/format.h>
12#include <log4cplus/configurator.h>
13#include <log4cplus/logger.h>
14#include <log4cplus/loggingmacros.h>
15#include <log4cplus/helpers/stringhelper.h>
17#if __has_include(<open62541.h>)
20#include <open62541/server.h>
21#include <open62541/plugin/log_stdout.h>
24#include <ifw/fnd/defs/dataType.hpp>
33 const std::string&
AppLogName(
const std::string& _fgf_logger_name =
"");
47 std::string
FindFile(
const std::string& resource_filename);
51 UA_LogCategory category,
82#if ((UA_OPEN62541_VER_MAJOR * 100 + UA_OPEN62541_VER_MINOR) * 100 + UA_OPEN62541_VER_PATCH) >= 10400
83 static void CustomOpen62541LogClear(UA_Logger *log_context) {}
84 [[deprecated(
"use CustomOpen62541LogClear(UA_Logger*)")]]
86 static void CustomOpen62541LogClear(
void* log_context) __attribute__((unused));
87 static void CustomOpen62541LogClear(
void* log_context) {}
89 [[maybe_unused]]
static UA_Logger s_custom_logger =
Frame Grabber Camera Base Class definitions.
Definition binarySemaphore.hpp:43
void ConfigureLogging()
Configure log4cplus.
Definition logger.cpp:63
void CustomOpen62541Log(void *log_context, UA_LogLevel level, UA_LogCategory category, const char *msg, va_list args)
Definition logger.cpp:32
log4cplus::Logger & GetRootLogger()
Return reference to root logger.
Definition logger.cpp:79
const std::string & LogPropertiesName(const std::string &log_properties="")
Set the name of the log properties (default: "config/ifw/fgf/common/log.properties").
Definition logger.cpp:16
std::string FindFile(const std::string &resource_filename)
Definition logger.cpp:104
const std::string & AppLogName(const std::string &_fgf_logger_name="")
Set the name of the logger for this app (default: "fgf-app").
Definition logger.cpp:24
log4cplus::Logger & GetAppLogger()
Return reference to application logger.
Definition logger.cpp:88