YARP
Yet Another Robot Platform
LogComponent.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-License-Identifier: BSD-3-Clause
4
*/
5
6
#ifndef YARP_OS_IMPL_LOGCOMPONENT_H
7
#define YARP_OS_IMPL_LOGCOMPONENT_H
8
9
#include <
yarp/os/api.h
>
10
#include <
yarp/os/LogComponent.h
>
11
12
namespace
yarp
{
13
namespace
os {
14
namespace
impl {
15
namespace
LogComponent
{
16
17
void
print_callback
(
yarp::os::Log::LogType
type,
18
const
char
* msg,
19
const
char
* file,
20
const
unsigned
int
line,
21
const
char
* func,
22
double
systemtime,
23
double
networktime,
24
double
externaltime,
25
const
char
* comp_name);
26
27
yarp::os::Log::LogType
minimumLogType
();
28
void
setMinumumLogType
(
yarp::os::Log::LogType
minumumLogType);
29
30
}
// namespace LogComponent
31
}
// namespace impl
32
}
// namespace os
33
}
// namespace yarp
34
35
#define YARP_OS_LOG_COMPONENT(name, name_string) \
36
const yarp::os::LogComponent& name() \
37
{ \
38
static const yarp::os::LogComponent component(name_string, \
39
yarp::os::impl::LogComponent::minimumLogType(), \
40
yarp::os::Log::LogTypeReserved, \
41
yarp::os::Log::defaultPrintCallback(), \
42
nullptr); \
43
return component; \
44
}
45
46
#define YARP_OS_NON_CONST_LOG_COMPONENT(name, name_string) \
47
yarp::os::LogComponent& name() \
48
{ \
49
static yarp::os::LogComponent component(name_string, \
50
yarp::os::impl::LogComponent::minimumLogType(), \
51
yarp::os::Log::LogTypeReserved, \
52
yarp::os::Log::defaultPrintCallback(), \
53
nullptr); \
54
return component; \
55
}
56
57
#endif
// YARP_OS_IMPL_LOGCOMPONENT_H
yarp::os::LogComponent
Definition:
LogComponent.h:18
yarp::os::Log::LogType
LogType
Definition:
Log.h:72
LogComponent.h
yarp::os::impl::LogComponent::print_callback
void print_callback(yarp::os::Log::LogType type, const char *msg, const char *file, const unsigned int line, const char *func, double systemtime, double networktime, double externaltime, const char *comp_name)
yarp::os::impl::LogComponent::minimumLogType
yarp::os::Log::LogType minimumLogType()
Definition:
LogComponent.cpp:25
yarp::os::impl::LogComponent::setMinumumLogType
void setMinumumLogType(yarp::os::Log::LogType minumumLogType)
Definition:
LogComponent.cpp:30
yarp
The main, catch-all namespace for YARP.
Definition:
dirs.h:16
api.h
YARP
3.5.1
src
libYARP_os
src
yarp
os
impl
LogComponent.h
Generated on Sat Dec 25 2021 02:23:04 for YARP by
1.9.1