X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=perl%2FAmanda%2FLogfile.pod;h=9c1286cc8278d6c61dd8d8fe44f8c979c120c761;hb=c6f0a88c567f8536c498f554285aed1f8150da18;hp=0663f44560dcaca1f92e7e6beb87399eadc7d8ac;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/perl/Amanda/Logfile.pod b/perl/Amanda/Logfile.pod index 0663f44..9c1286c 100644 --- a/perl/Amanda/Logfile.pod +++ b/perl/Amanda/Logfile.pod @@ -86,20 +86,41 @@ C<$handle>, or nothing at the end of the logfile. =back -To write a logfile, call C. On the first -call, this function opens and locks C<$logdir/log>; subsequent calls -just append to this file. As such, this function is only appropriate -for situations where C will be invoked later to rename -C<$logdir/log> to C<$logdir/log.$timestamp.$n>. +=head3 Writing a "current" Logfile + +To write a logfile, call C. On the first call, +this function opens and locks C<$logdir/log>; subsequent calls just append to +this file. As such, this function is only appropriate for situations where +C will be invoked later to rename C<$logdir/log> to +C<$logdir/log.$timestamp.$n>. + +If you need to write a log entry for another program, for example to simulate +taper entries, call C. All of the functions in this section can be imported by name if desired. +=head3 Utilities + +Many trace log entries have a statistics entry in what used to be the error +message slot, of the form C<[sec .. kb .. kps ..]>. The function C +will create such an entry for you: + + make_stats($size, $duration, $orig_kb); + +Note that C<$orig_kb> can be undefined, in which case it will not appear in +the statistics output. + =head2 Amanda::Find::find_result_t objects These objects contain information about dumps, as read from logfiles. Instance variables are: +To rename the current logfile to a datestamped logfile, call C +where C<$ts> is the write timestamp for this dump. The +C function will calculate this timestamp, +returning C on error. + =over =item C @@ -185,16 +206,6 @@ the same result, that result will be returned multiple times. All of these functions can be imported by name. -=head1 MATCHING - -The following functions are available to match strings against patterns using -the rules described in amanda(8): - - match_host($pat, $str); - match_disk($pat, $str); - match_datestamp($pat, $str); - match_level($pat, $str); - =head1 DEBUG LOGGING HANDLER This package provides C<$amanda_log_trace_log>, which sends C