in reply to Scalars tied to logfiles

To include location information just use Carp; in your module and change each logging statement to use Carp::shortmess:

print {$self->{LOG}} Carp::shortmess "$self->{Name} => STORE\t\tValue = $value" if $self->{STORE};

Replies are listed 'Best First'.
Re: Re: Scalars tied to logfiles
by davido (Cardinal) on Dec 11, 2003 at 06:08 UTC
    I like that suggestion, and in my tests it worked like a charm. But it does make for a pretty messy looking logfile. Perhaps I'll have to preprocess the output of Carp::shortmess before I write it to the logfile, to massage it into something a little cleaner looking.


    Dave