YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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>
11
13
15 const char* msg,
16 const char* file,
17 const unsigned int line,
18 const char* func,
19 double systemtime,
20 double networktime,
21 double externaltime,
22 const char* comp_name);
23
26
27} // namespace yarp::os::impl::LogComponent
28
29#define YARP_OS_LOG_COMPONENT(name, name_string) \
30 const yarp::os::LogComponent& name() \
31 { \
32 static const yarp::os::LogComponent component(name_string, \
33 yarp::os::impl::LogComponent::minimumLogType(), \
34 yarp::os::Log::LogTypeReserved, \
35 yarp::os::Log::defaultPrintCallback(), \
36 nullptr); \
37 return component; \
38 }
39
40#define YARP_OS_NON_CONST_LOG_COMPONENT(name, name_string) \
41 yarp::os::LogComponent& name() \
42 { \
43 static yarp::os::LogComponent component(name_string, \
44 yarp::os::impl::LogComponent::minimumLogType(), \
45 yarp::os::Log::LogTypeReserved, \
46 yarp::os::Log::defaultPrintCallback(), \
47 nullptr); \
48 return component; \
49 }
50
51#endif // YARP_OS_IMPL_LOGCOMPONENT_H
A mini-server for performing network communication in the background.
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::Log::LogType minimumLogType()
void setMinumumLogType(yarp::os::Log::LogType minumumLogType)