[Devel] [ openser-Patches-1728481 ] Debug level changeable during runtime

SourceForge.net noreply at sourceforge.net
Wed May 30 20:35:20 CEST 2007


Patches item #1728481, was opened at 2007-05-30 14:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1728481&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.2.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Anatoly Pidruchny (apidruchny)
Assigned to: Nobody/Anonymous (nobody)
Summary: Debug level changeable during runtime

Initial Comment:
The proposed patch allows to change the debug level during runtime using the command:

openserctl unixsock debug <new level>

Just to get the current debug level, use the command:

openserctl unixsock debug


The feature is implemented by putting the debug level into the shared memory. The type of the global variable "debug" has been changed from int to a pointer to int.

This patch also has some improvements of the logging subsystem in the case when log_stderr logging is used:
1. Timestamp of each message is printed in the header.
2. The level of each log message is printed in the header.
3. C library functions fprintf, vfprintf and fflush are no longer used. The problem with these functions was that sometimes log messages from other openser processes were printed between a header and a body of a log message. If a lot of log messages are printed at the same time from different processes then this causes a hardly readable mess. The solution is to use our own buffer in dprint.c to construct the full log message, then print it as a whole thing using the write system call.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1728481&group_id=139143



More information about the Devel mailing list