https://github.com/mfcovington/log-history
Make self-documenting scripts that track their own execution history
https://github.com/mfcovington/log-history
Last synced: over 1 year ago
JSON representation
Make self-documenting scripts that track their own execution history
- Host: GitHub
- URL: https://github.com/mfcovington/log-history
- Owner: mfcovington
- Created: 2014-06-22T23:49:25.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-23T16:06:44.000Z (about 12 years ago)
- Last Synced: 2025-02-14T15:14:56.694Z (over 1 year ago)
- Language: Perl
- Homepage:
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
Awesome Lists containing this project
README
# NAME
Log::History - Make self-documenting scripts that track their own execution history.
# SYNOPSIS
Place the import statement for Log::History wherever you want the log to start.
use Log::History;
#2014-02-02 12:43:08 (00:00:48) in /path/to/workingdir: /path/to/script.pl --opt 1 --param 2
...
To limit the number of log entries, specify how many to keep.
The oldest entries are discarded.
use Log::History '3';
#2014-05-27 ...
#2007-12-18 ...
#1987-12-18 ...
# DESCRIPTION
Log::History enables scripts to keep track of their own execution history.
Each log entry reports the date, start time, elapsed run time, working directory,
and a record of exactly how the script was called.
# CAVEATS
Because Log::History modifies the script that imports it, problems can occur
if too many instances of the script are run at one time.
(Actually, the problem can arise if one instance ends at the exact time another is starting.)
If you don't have write access for the script, no log will be generated.
# ACKNOWLEDGEMENTS
I was inspired to write this after recently re-reading Neil Bowers' post:
[Identifying CPAN distributions you could help out with](http://blogs.perl.org/users/neilb/2012/12/modules-that-are-candidates-for-helping-out.html).
In it, I found Tushar Murudkar's no-longer-maintained module [Log::SelfHistory](https://metacpan.org/pod/Log::SelfHistory).
I was intrigued since I had been working on [Log::Reproducible](https://github.com/mfcovington/Log-Reproducible).
I wanted to go in a different direction, so decided to start from scratch instead of trying to take over [Log::SelfHistory](https://metacpan.org/pod/Log::SelfHistory).
# AUTHOR
Michael F. Covington
# SEE ALSO
[Log::SelfHistory](https://metacpan.org/pod/Log::SelfHistory), [Log::Reproducible](https://github.com/mfcovington/Log-Reproducible)