Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #773 (closed enhancement: fixed)

Opened 16 years ago

Last modified 16 years ago

tango.util.log.Trace shall have more functions for debugging support

Reported by: keinfarbton Assigned to: kris
Priority: normal Milestone: 2.0
Component: Tango Version: 0.99.3 Triller
Keywords: triage Cc:

Description (Last modified by keinfarbton)

I think a common use case for Trace is "printf debugging", this is why i miss these:

  1. opCall(...)/print(...) from Print
  2. dumpMemory( void[] mem ) which produces lines with start address, memory content in hex values and print the bytes in ascii (for printable ascii chars only).
0000: 00 00 00 00 00 20 41 42 43 00 00 00 00 00 00 00 : ..... ABC.......
0010: FF FE 00 00 00 20 41                            : .~... A

Change History

11/22/07 16:05:19 changed by keinfarbton

  • description changed.

11/22/07 16:10:55 changed by keinfarbton

I just noticed, the comment in Trace.d

/*******************************************************************************

        Intended for internal use only

*******************************************************************************/

private class SyncPrint
{

Is this still the case? Is it really not meant to be used by tango users?

11/22/07 16:22:16 changed by keinfarbton

Trace was announced on 2nd Oct as new Tango feature posting, so i wonder about this comment and the private attribute.

11/22/07 17:13:30 changed by keinfarbton

If this means, the class shall not be instantiated by the user, its not the class that shall be private.

  • make ctor private
  • make class public, so the doc is generated for it.

02/11/08 03:30:28 changed by kris

  • status changed from new to assigned.
  • milestone set to 2.0.

05/25/08 14:11:06 changed by larsivi

  • keywords set to triage.

I thought possibly that some work on this was made after this ticket was created, but I can't find the reference to it.

05/25/08 18:54:01 changed by kris

Yes, the symbol SyncPrint was intended to be module-private at that time. There is a public instance exposed, called Trace, which is tied to Cerr. I guess Trace might be a reasonable place to add the memory dump feature, but the

print(foo)(bar).newline

idiom cannot be used conveniently here as it is non-atomic

05/26/08 23:04:10 changed by kris

Would you like to add the memory() function, Keinfarbton?

05/31/08 14:38:02 changed by keinfarbton

  • status changed from assigned to closed.
  • resolution set to fixed.

Done in -r3539