Patches item #456225, was opened at 2001-08-28 11: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: Nobody/Anonymous (nobody)
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.

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

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

Reply via email to