PlogArmarXAppender.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5
*
6
* ArmarX is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*
10
* ArmarX is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* @package ArmarXCore::core
19
* @date 2026
20
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21
* GNU General Public License
22
*/
23
#pragma once
24
25
#if ARMARX_PLOG_SUPPORT
26
27
#include <string>
28
29
#include <plog/Appenders/IAppender.h>
30
31
namespace
armarx
32
{
33
/**
34
\class PlogArmarXAppender
35
\brief Bridges plog log records (e.g. from Simox) into the ArmarX logging framework.
36
\ingroup Logging
37
38
Implements plog's IAppender interface. Each record is forwarded into
39
armarx::LogSender, so it appears in the ArmarX console output and LogViewer
40
exactly like a message logged via ARMARX_INFO and friends, respecting the
41
same activation/verbosity settings.
42
*/
43
class
PlogArmarXAppender :
public
plog::IAppender
44
{
45
public
:
46
explicit
PlogArmarXAppender(std::string tag =
"PLOG"
);
47
48
void
write
(
const
plog::Record& record)
override
;
49
50
private
:
51
std::string
tag
;
52
};
53
54
/**
55
Registers a process-wide PlogArmarXAppender with plog's default logger
56
instance, so PLOG_* log statements from libraries such as Simox are
57
forwarded into the ArmarX log. Safe to call multiple times; only
58
registers once.
59
*/
60
void
RegisterPlogArmarXAppender();
61
62
}
// namespace armarx
63
64
#endif
// ARMARX_PLOG_SUPPORT
armarx::aron::write
void write(WriterT &aron_w, const Eigen::Matrix< EigenT, rows, cols, options > &input, typename WriterT::ReturnType &ret, const armarx::aron::Path &aron_p=armarx::aron::Path())
Definition
eigen.h:138
armarx::detail::StreamPrinterTag::tag
@ tag
Definition
LoggingUtil.h:33
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition
ArmarXTimeserver.cpp:28
ArmarXCore
core
logging
PlogArmarXAppender.h
Generated by
1.13.2