In Java that would be BTrace.
Logging as a code smell
21–30 of 54 posts
Re: Logging as a code smell
#22Re: Logging as a code smell
#23I'm not sure this article does a good enough job of explaining why it's a code smell. Aside from the event bus code looking slightly better, I don't see any big advantages. One disadvantage is that if you have a big class with lots of different events, you now have to import all of your events rather than just importing the singular logger. Typically I only resort to logging in situations where I don't want to propag…
Awful hard to attach a debugger to a production system?
Re: Logging as a code smell
#24Re: Logging as a code smell
#25I'm not sure this article does a good enough job of explaining why it's a code smell. Aside from the event bus code looking slightly better, I don't see any big advantages. One disadvantage is that if you have a big class with lots of different events, you now have to import all of your events rather than just importing the singular logger. Typically I only resort to logging in situations where I don't want to propag…
> Pretty disappointed with the actual post.
I am as well. What the author describes isn't new or novel, it's been in Windows in the form of ETW since the early 90's. And Windows wasn't the first OS to get it. Had the author taken a serious System/OS class he would have known.
You can't build high performance applications without using some scheme similar to what the author describe.
Re: Logging as a code smell
#26I love the idea of an event bus, but all I use is C and embedded. The last time I considered it I backed away from it. Wish there was effort to establish a pattern for this in C.
I believe ZeroMQ has libraries/implementation suitable for embedded systems.
Replies extremely heavy on POSIX api and threads. All the cool functionality is with sockets. There is an inproc:// but it doesn’t do much.
Lighter to just work it out using RTOS objects like queues and streams.
Re: Logging as a code smell
#27Re: Logging as a code smell
#28Wrap it in a class of your own so the logger (or whatever) can be easily swapped out if you want to use a different logging system, events, or whatever.
Re: Logging as a code smell
#29The reasons in the post did not convince me on why my log messages should be structured. For example, why would I want to internationalize those messages?
Re: Logging as a code smell
#30It's a shame the author didn't actually look at logging as a code smell. For example, is a high density of logging statements in code an indication of places which are brittle and hard to figure out and therefore candidates for reworking? That would be an interesting topic I think.