Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: What is the best way to dump data structures to logfiles?

by shmem (Canon)
on Mar 13, 2007 at 18:53 UTC ( #604651=note: print w/ replies, xml ) Need Help??


in reply to What is the best way to dump data structures to logfiles?

This is for day-by-day operations to support user problems, and figure out what happened to the system during determined interesting events.
For that purpose I would focus on readability, which is not something Data::Dumper (or Data::Dump::Streamer) provide. For support tasks you need reports, and IMHO there's nothing better yet for that than format, formline and write (you could use Text::Template or Template but maybe you don't want their overhead).

It might be a tedious task to generate the perlform reports in the first place, but that pays off since you have a better oversight of your data. You can even enrich those reports with ANSI colours to browse them in a colour capable terminal with e.g. less -R.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}


Comment on Re: What is the best way to dump data structures to logfiles?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://604651]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2015-07-02 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (46 votes), past polls