Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

notbenh/Devel-AutoTrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Devel::AutoTrace - Currently a half baked idea on how to do automatic loging of a codebase such that you can know where the cruft is.

SYNOPSIS

> perl -d:AutoTrace my_script.pl
> cat /tmp/devel_autotrace.log 
[43a3a8bf38dfabe838eeac5a9daa2180:1309665646.17477] my_host : ./my_script.pl : start
[43a3a8bf38dfabe838eeac5a9daa2180:1309665647.40194] my_host : ./my_script.pl : end
> cat /tmp/43a3a8bf38dfabe838eeac5a9daa2180.traceuse 
... 

DESCRIPTION

{{EXPLAIN WHATS GOING ON HERE}}

CONFIGURATION

Currently this is done via %ENV, this might change

AUTOTRACE_LOGROOT

Default is to write to '/tmp', setting $ENV{AUTOTRACE_LOGROOT} will override this. You are require to make sure that path exists.

AUTOTRACE_LOGFILE

Default is 'devel_autotrace.log', set $ENV{AUTOTRACE_LOGFILE} to change.

AUTOTRACE_UID

Default is to build a md5_hex from hostname, $0, time, and a random number.

LOG FORMAT

Current log format is: [AUTOTRACE_UID:time_hires] hostname : $0 : $msg\n

Currently only 'start' and 'end' are tracked.

STACK TRACE

Devel::TraceUse is used to build a stack trace that is saved to AUTOTRACE_LOGROOT/AUTOTRACE_UID.traceuse.

TODO

  • Only 'start' and 'end' are tracked.

  • ATLOG is not exported... should it be?

  • Devel::TraceUse is called from Devel::AutoTrace context thus the heading on the report is wrong.

About

... sketchy idea ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages