YARP
Yet Another Robot Platform
LogComponent.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3
* All rights reserved.
4
*
5
* This software may be modified and distributed under the terms of the
6
* BSD-3-Clause license. See the accompanying LICENSE file for details.
7
*/
8
9
#ifndef YARP_OS_IMPL_LOGCOMPONENT_H
10
#define YARP_OS_IMPL_LOGCOMPONENT_H
11
12
#include <
yarp/os/api.h
>
13
#include <
yarp/os/LogComponent.h
>
14
15
namespace
yarp
{
16
namespace
os {
17
namespace
impl {
18
namespace
LogComponent
{
19
20
void
print_callback
(
yarp::os::Log::LogType
type,
21
const
char
* msg,
22
const
char
* file,
23
const
unsigned
int
line,
24
const
char
* func,
25
double
systemtime,
26
double
networktime,
27
double
externaltime,
28
const
char
* comp_name);
29
30
void
setMinumumLogType
(
yarp::os::Log::LogType
minumumLogType);
31
32
}
// namespace LogComponent
33
}
// namespace impl
34
}
// namespace os
35
}
// namespace yarp
36
37
#define YARP_OS_LOG_COMPONENT(name, name_string) \
38
const yarp::os::LogComponent& name() \
39
{ \
40
static const yarp::os::LogComponent component(name_string, \
41
yarp::os::Log::TraceType, \
42
yarp::os::Log::LogTypeReserved, \
43
yarp::os::impl::LogComponent::print_callback, \
44
nullptr); \
45
return component; \
46
}
47
48
#define YARP_OS_NON_CONST_LOG_COMPONENT(name, name_string) \
49
yarp::os::LogComponent& name() \
50
{ \
51
static yarp::os::LogComponent component(name_string, \
52
yarp::os::Log::TraceType, \
53
yarp::os::Log::LogTypeReserved, \
54
yarp::os::impl::LogComponent::print_callback, \
55
nullptr); \
56
return component; \
57
}
58
59
#endif // YARP_OS_IMPL_LOGCOMPONENT_H
yarp::os::impl::LogComponent::setMinumumLogType
void setMinumumLogType(yarp::os::Log::LogType minumumLogType)
Definition:
LogComponent.cpp:69
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)
Definition:
LogComponent.cpp:54
api.h
yarp::os::Log::LogType
LogType
Definition:
Log.h:75
yarp::os::LogComponent
Definition:
LogComponent.h:21
LogComponent.h
yarp
The main, catch-all namespace for YARP.
Definition:
environment.h:18
YARP
3.4.100+20201223.2+gitb8ea4d712
src
libYARP_os
src
yarp
os
impl
LogComponent.h
Generated on Sun Jan 3 2021 02:46:24 for YARP by
1.8.20