6#ifndef YARP_OS_LOGCOMPONENT_H
7#define YARP_OS_LOGCOMPONENT_H
39 constexpr operator bool()
const {
return m_name !=
nullptr; }
41#ifndef DOXYGEN_SHOULD_SKIP_THIS
43#ifndef YARP_NO_DEPRECATED
46 void setMinimumPrintLevel(LogType minimumPrintLevel);
47 void setMinimumForwardLevel(LogType minimumForwardLevel);
51 const char* m_name {
nullptr };
73#define YARP_DECLARE_LOG_COMPONENT(name) \
74 extern const yarp::os::LogComponent& name();
76#define YARP_LOG_COMPONENT(name, ...) \
77 const yarp::os::LogComponent& name() \
79 static const yarp::os::LogComponent component(__VA_ARGS__); \
84# define yCTrace(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", nullptr, (component)()).trace(__VA_ARGS__)
85# define yCTraceOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_ONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
86# define yCTraceThreadOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
87# define yCTraceThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
88# define yCTraceThreadThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADTHROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
89# define yCTraceExternalTime(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, nullptr, (component)()).trace(__VA_ARGS__)
90# define yCTraceExternalTimeOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_ONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
91# define yCTraceExternalTimeThreadOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
92# define yCTraceExternalTimeThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
93# define yCTraceExternalTimeThreadThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
94# define yCITrace(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, nullptr, (component)()).trace(__VA_ARGS__)
95# define yCITraceOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_ONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
96# define yCITraceThreadOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
97# define yCITraceThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
98# define yCITraceThreadThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
99# define yCITraceExternalTime(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, nullptr, (component)()).trace(__VA_ARGS__)
100# define yCITraceExternalTimeOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_ONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
101# define yCITraceExternalTimeThreadOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADONCE_CALLBACK, (component)()).trace(__VA_ARGS__)
102# define yCITraceExternalTimeThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
103# define yCITraceExternalTimeThreadThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).trace(__VA_ARGS__)
105# define yCTrace(component, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
106# define yCTraceOnce(component, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
107# define yCTraceThreadOnce(component, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
108# define yCTraceThrottle(component, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
109# define yCTraceThreadThrottle(component, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
110# define yCTraceExternalTime(component, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
111# define yCTraceExternalTimeOnce(component, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
112# define yCTraceExternalTimeThreadOnce(component, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
113# define yCTraceExternalTimeThrottle(component, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
114# define yCTraceExternalTimeThreadThrottle(component, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
115# define yCITrace(component, id, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
116# define yCITraceOnce(component, id, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
117# define yCITraceThreadOnce(component, id, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
118# define yCITraceThrottle(component, id, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
119# define yCITraceThreadThrottle(component, id, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
120# define yCITraceExternalTime(component, id, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
121# define yCITraceExternalTimeOnce(component, id, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
122# define yCITraceExternalTimeThreadOnce(component, id, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
123# define yCITraceExternalTimeThrottle(component, id, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
124# define yCITraceExternalTimeThreadThrottle(component, id, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
127#ifndef YARP_NO_DEBUG_OUTPUT
128# define yCDebug(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", nullptr, (component)()).debug(__VA_ARGS__)
129# define yCDebugOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_ONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
130# define yCDebugThreadOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
131# define yCDebugThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
132# define yCDebugThreadThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADTHROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
133# define yCDebugExternalTime(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, nullptr, (component)()).debug(__VA_ARGS__)
134# define yCDebugExternalTimeOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_ONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
135# define yCDebugExternalTimeThreadOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
136# define yCDebugExternalTimeThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
137# define yCDebugExternalTimeThreadThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
138# define yCIDebug(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, nullptr, (component)()).debug(__VA_ARGS__)
139# define yCIDebugOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_ONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
140# define yCIDebugThreadOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
141# define yCIDebugThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
142# define yCIDebugThreadThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
143# define yCIDebugExternalTime(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, nullptr, (component)()).debug(__VA_ARGS__)
144# define yCIDebugExternalTimeOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_ONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
145# define yCIDebugExternalTimeThreadOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADONCE_CALLBACK, (component)()).debug(__VA_ARGS__)
146# define yCIDebugExternalTimeThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
147# define yCIDebugExternalTimeThreadThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).debug(__VA_ARGS__)
149# define yCDebug(component, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
150# define yCDebugOnce(component, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
151# define yCDebugThreadOnce(component, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
152# define yCDebugThrottle(component, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
153# define yCDebugThreadThrottle(component, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
154# define yCDebugExternalTime(component, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
155# define yCDebugExternalTimeOnce(component, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
156# define yCDebugExternalTimeThreadOnce(component, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
157# define yCDebugExternalTimeThrottle(component, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
158# define yCDebugExternalTimeThreadThrottle(component, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
159# define yCIDebug(component, id, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
160# define yCIDebugOnce(component, id, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
161# define yCIDebugThreadOnce(component, id, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
162# define yCIDebugThrottle(component, id, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
163# define yCIDebugThreadThrottle(component, id, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
164# define yCIDebugExternalTime(component, id, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
165# define yCIDebugExternalTimeOnce(component, id, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
166# define yCIDebugExternalTimeThreadOnce(component, id, externaltime, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
167# define yCIDebugExternalTimeThrottle(component, id, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
168# define yCIDebugExternalTimeThreadThrottle(component, id, externaltime, period, ...) YARP_UNUSED((component)()); yarp::os::Log::nolog(__VA_ARGS__)
171#define yCInfo(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", nullptr, (component)()).info(__VA_ARGS__)
172#define yCInfoOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_ONCE_CALLBACK, (component)()).info(__VA_ARGS__)
173#define yCInfoThreadOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADONCE_CALLBACK, (component)()).info(__VA_ARGS__)
174#define yCInfoThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
175#define yCInfoThreadThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADTHROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
176#define yCInfoExternalTime(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, nullptr, (component)()).info(__VA_ARGS__)
177#define yCInfoExternalTimeOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_ONCE_CALLBACK, (component)()).info(__VA_ARGS__)
178#define yCInfoExternalTimeThreadOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADONCE_CALLBACK, (component)()).info(__VA_ARGS__)
179#define yCInfoExternalTimeThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
180#define yCInfoExternalTimeThreadThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
181#define yCIInfo(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, nullptr, (component)()).info(__VA_ARGS__)
182#define yCIInfoOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_ONCE_CALLBACK, (component)()).info(__VA_ARGS__)
183#define yCIInfoThreadOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADONCE_CALLBACK, (component)()).info(__VA_ARGS__)
184#define yCIInfoThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
185#define yCIInfoThreadThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
186#define yCIInfoExternalTime(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, nullptr, (component)()).info(__VA_ARGS__)
187#define yCIInfoExternalTimeOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_ONCE_CALLBACK, (component)()).info(__VA_ARGS__)
188#define yCIInfoExternalTimeThreadOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADONCE_CALLBACK, (component)()).info(__VA_ARGS__)
189#define yCIInfoExternalTimeThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
190#define yCIInfoExternalTimeThreadThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).info(__VA_ARGS__)
192#define yCWarning(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", nullptr, (component)()).warning(__VA_ARGS__)
193#define yCWarningOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_ONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
194#define yCWarningThreadOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
195#define yCWarningThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
196#define yCWarningThreadThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADTHROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
197#define yCWarningExternalTime(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, nullptr, (component)()).warning(__VA_ARGS__)
198#define yCWarningExternalTimeOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_ONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
199#define yCWarningExternalTimeThreadOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
200#define yCWarningExternalTimeThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
201#define yCWarningExternalTimeThreadThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
202#define yCIWarning(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, nullptr, (component)()).warning(__VA_ARGS__)
203#define yCIWarningOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_ONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
204#define yCIWarningThreadOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
205#define yCIWarningThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
206#define yCIWarningThreadThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
207#define yCIWarningExternalTime(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, nullptr, (component)()).warning(__VA_ARGS__)
208#define yCIWarningExternalTimeOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_ONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
209#define yCIWarningExternalTimeThreadOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADONCE_CALLBACK, (component)()).warning(__VA_ARGS__)
210#define yCIWarningExternalTimeThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
211#define yCIWarningExternalTimeThreadThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).warning(__VA_ARGS__)
213#define yCError(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", nullptr, (component)()).error(__VA_ARGS__)
214#define yCErrorOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_ONCE_CALLBACK, (component)()).error(__VA_ARGS__)
215#define yCErrorThreadOnce(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADONCE_CALLBACK, (component)()).error(__VA_ARGS__)
216#define yCErrorThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
217#define yCErrorThreadThrottle(component, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", YARP_THREADTHROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
218#define yCErrorExternalTime(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, nullptr, (component)()).error(__VA_ARGS__)
219#define yCErrorExternalTimeOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_ONCE_CALLBACK, (component)()).error(__VA_ARGS__)
220#define yCErrorExternalTimeThreadOnce(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADONCE_CALLBACK, (component)()).error(__VA_ARGS__)
221#define yCErrorExternalTimeThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
222#define yCErrorExternalTimeThreadThrottle(component, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, "", externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
223#define yCIError(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, nullptr, (component)()).error(__VA_ARGS__)
224#define yCIErrorOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_ONCE_CALLBACK, (component)()).error(__VA_ARGS__)
225#define yCIErrorThreadOnce(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADONCE_CALLBACK, (component)()).error(__VA_ARGS__)
226#define yCIErrorThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
227#define yCIErrorThreadThrottle(component, id, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
228#define yCIErrorExternalTime(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, nullptr, (component)()).error(__VA_ARGS__)
229#define yCIErrorExternalTimeOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_ONCE_CALLBACK, (component)()).error(__VA_ARGS__)
230#define yCIErrorExternalTimeThreadOnce(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADONCE_CALLBACK, (component)()).error(__VA_ARGS__)
231#define yCIErrorExternalTimeThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
232#define yCIErrorExternalTimeThreadThrottle(component, id, externaltime, period, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, YARP_THREADTHROTTLE_CALLBACK(period), (component)()).error(__VA_ARGS__)
234#define yCFatal(component, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, nullptr, (component)()).fatal(__VA_ARGS__)
235#define yCFatalExternalTime(component, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, externaltime, nullptr, (component)()).fatal(__VA_ARGS__)
236#define yCIFatal(component, id, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, nullptr, (component)()).fatal(__VA_ARGS__)
237#define yCIFatalExternalTime(component, id, externaltime, ...) yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__, id, externaltime, nullptr, (component)()).fatal(__VA_ARGS__)
240# define yCAssert(component, x) \
242 yCFatal(component, "Assertion failure at %s:%d (%s)", __FILE__, __LINE__, #x); \
244# define yCAssertExternalTime(component, externaltime, x) \
246 yCFatalExternalTime(component, externaltime, "Assertion failure at %s:%d (%s)", __FILE__, __LINE__, #x); \
248# define yCIAssert(component, id, x) \
250 yCIFatal(component, id, "Assertion failure at %s:%d (%s)", __FILE__, __LINE__, #x); \
252# define yCIAssertExternalTime(component, id, externaltime, x) \
254 yCIFatalExternalTime(component, id, externaltime, "Assertion failure at %s:%d (%s)", __FILE__, __LINE__, #x); \
257# define yCAssert(component, x) { YARP_UNUSED((component)()); }
258# define yCAssertExternalTime(component, externaltime, x) { YARP_UNUSED((component)()); YARP_UNUSED(externaltime); }
259# define yCIAssert(component, id, x) { YARP_UNUSED((component)()); YARP_UNUSED(id); }
260# define yCIAssertExternalTime(component, id, externaltime, x) { YARP_UNUSED((component)()); YARP_UNUSED(id); YARP_UNUSED(externaltime); }
A mini-server for performing network communication in the background.
LogComponent(LogComponent &&) noexcept=delete
LogComponent(const LogComponent &)=delete
yarp::os::Log::LogCallback LogCallback
static LogCallback printCallback()
Get current print callback.
static LogType minimumPrintLevel()
Get current minimum print level.
static LogCallback forwardCallback()
Get current forward callback (or nullptr if forwarding is not enabled)
static LogType minimumForwardLevel()
Get current minimum forward level (or LogTypeReserved if forwarding is not enabled)
void(*)(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, const char *id) LogCallback
yarp::os::Log::LogCallback LogCallback
An interface to the operating system, including Port based communication.
The main, catch-all namespace for YARP.
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)
Suppress MSVC C4251 warning for the declaration.