Skip to content

Commit 293acfd

Browse files
committed
Revert "change: removed log_base from service_provider_base"
This reverts commit 9bb222a.
1 parent a232be5 commit 293acfd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/robotkernel/service_provider_base.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "robotkernel/device_listener.h"
3737
#include "robotkernel/exceptions.h"
3838
#include "robotkernel/helpers.h"
39+
#include "robotkernel/log_base.h"
3940
#include "robotkernel/service_interface.h"
4041
#include "robotkernel/robotkernel.h"
4142

@@ -170,6 +171,7 @@ namespace robotkernel {
170171

171172
template <class T, class S>
172173
class service_provider_base :
174+
public log_base,
173175
public device_listener,
174176
public std::enable_shared_from_this<service_provider_base<T, S> >
175177
{
@@ -187,6 +189,7 @@ class service_provider_base :
187189
* \param name instance name
188190
*/
189191
service_provider_base(const std::string& name, const std::string& impl) :
192+
log_base(name, impl, ""),
190193
device_listener(name, "listener")
191194
{};
192195

@@ -277,10 +280,13 @@ inline void service_provider_base<T, S>::add_interface(std::shared_ptr<service_i
277280
handler = std::make_shared<T>(local_req);
278281
} catch (std::exception& e) {
279282
// if exception is thrown, req does not belong to us
283+
log(warning, "adding interface: %s\n", e.what());
280284
handler = NULL;
281285
}
282286

283287
if (handler) {
288+
log(verbose, "got new service_interface: owner %s, id %s\n",
289+
local_req->owner.c_str(), local_req->id().c_str());
284290
handler_map[std::make_pair(local_req->owner, local_req->id())] = handler;
285291
}
286292
};

0 commit comments

Comments
 (0)