Patches item #456225, was opened at 2001-08-28 14:08
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=303152&aid=456225&group_id=3152

Category: aolserver3_3
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Kriston Rehberg (kriston)
Summary: ns_logdump command

Initial Comment:
Dump a string in hex and ascii to the log. Available
from C or Tcl. Useful in debugging new protocols


Add a C API and Tcl API for dumping HEX to the log.

void Ns_LogDumpString(Ns_LogSeverity severity, char
*s,  int len)

and
ns_logdump severity string

Severity is a standard ns_log severity constant,
Notice, Warning, Error, Debug, or Dev.

The output in the log file looks like:

0000: 4164 6420 6120 4320 4150 4920 616e 6420  Add a C
API and
0010: 5463 6c20 4150 4920 666f 7220 6475 6d70  Tcl API
for dump
0020: 696e 6720 4845 5820 746f 2074 6865 206c  ing HEX
to the l
0030: 6f67 2e0a 0a76 6f69 6420 4e73 5f4c 6f67
og...void Ns_Log
0040: 4475 6d70 5374 7269 6e67 284e 735f 4c6f
DumpString(Ns_Lo

The length of a line is controlled by a tcl config
parameter, dumpbytesperline, that defaults to 32.
  ns_section      ns/parameters
  ns_param        dumpbytesperline   32

This patch modifies: nsd/log.c, nsd/nsconf.c,
nsd/nsconf.h, nsd/nsd.h, nsd/tclcmds.c.

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

>Comment By: Kriston Rehberg (kriston)
Date: 2002-03-20 11:20

Message:
Logged In: YES
user_id=16427

Would it be possible to take a look at nsd_v3_r3_p0 head
version and apply a patch against that?  Or maybe just
AOLserver 3.4.2?

Thanks.


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

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-28 15:39

Message:
Logged In: YES
user_id=20647

Use the second patch, not the first.  The first patch
doesn't declare Ns_LogDumpString within include/ns.h.  (Nb:
I tried deleting the patch, but sourceforge would not let
me.)

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

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-28 14:09

Message:
Logged In: YES
user_id=20647

Uh, the actual format looks a lot better than what
sourceforge did to my prior comment.  Looks good actually!

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

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=303152&aid=456225&group_id=3152

Reply via email to