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_SERVERSQL_IMPL_LOGCOMPONENT_H
10 #define YARP_SERVERSQL_IMPL_LOGCOMPONENT_H
11 
12 #include <yarp/os/api.h>
13 #include <yarp/os/LogComponent.h>
14 
15 namespace yarp {
16 namespace serversql {
17 namespace impl {
18 namespace LogComponent {
19 
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 serversql
35 } // namespace yarp
36 
37 #define YARP_SERVERSQL_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::DebugType, \
43  yarp::serversql::impl::LogComponent::print_callback, \
44  yarp::os::Log::forwardCallback()); \
45  return component; \
46  }
47 
48 #endif // YARP_SERVERSQL_IMPL_LOGCOMPONENT_H
api.h
yarp::serversql::impl::LogComponent::setMinumumLogType
void setMinumumLogType(yarp::os::Log::LogType minumumLogType)
Definition: LogComponent.cpp:44
yarp::os::Log::LogType
LogType
Definition: Log.h:75
LogComponent.h
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::serversql::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:19