X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=perl%2FAmanda%2FLogfile.pod;h=6b5bf32116be36018a142c2f376d54ba13a28f5a;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=0663f44560dcaca1f92e7e6beb87399eadc7d8ac;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/perl/Amanda/Logfile.pod b/perl/Amanda/Logfile.pod index 0663f44..6b5bf32 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