[progress Communities] [progress Openedge Abl] Forum Post: Re: Looking For A Clever Way Of...

Status
Not open for further replies.
P

Patrick Tingen

Guest
We use a combination of PUBLISH and the LOG-MANAGER. At the start of each program we do a call to initiate the logger. This logger is started persistently and checks in a database table whether it is active or not for that particular program. If it is active, it will subscribe to the "debugMessage" event. Inside our programs we have lots of publishes like this: PUBLISH "debugMessage" (1, "some interesting message here"). Whenever the logger receives this, it writes the string and the level number it receives to the log-manager. Works like a charm and the good part is that you do not have to change and recompile your program when you want to switch on debugging. You can do this even in production. As a matter of fact, we do. By default all logging is off in production, but if needed we can turn it on. Having PUBLISH statements without a receiving procedure listening (which is the normal situation) is hardly noticable in terms of performance.

Continue reading...
 
Status
Not open for further replies.
Top