8
0

Accepting request 525971 from devel:languages:perl:autoupdate

automatic update

OBS-URL: https://build.opensuse.org/request/show/525971
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Log-Dispatch-FileRotate?expand=0&rev=34
This commit is contained in:
Stephan Kulow
2017-09-17 17:49:26 +00:00
committed by Git OBS Bridge
parent 68c6bc0cc0
commit bb9d7c1aa6
4 changed files with 31 additions and 53 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e04883b504c3dd9482bcdbdf63ad8d5a9c6989620514db474f2bd12afefe323
size 25420

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:028a4c5293172b2f4ae7acbf0923f4467af1600c573fdc5067eea7707657095c
size 28202

View File

@@ -1,3 +1,26 @@
-------------------------------------------------------------------
Thu Sep 14 05:46:01 UTC 2017 - coolo@suse.com
- updated to 1.34
see /usr/share/doc/packages/perl-Log-Dispatch-FileRotate/Changes
1.34 Wed 55 13 2017
- We now use a a global Mutex object for each open file that gracefully
handles locking between threads and across forks. This fixes the
following deadlock scenarios:
- a $SIG{__WARN__} handler is installed that logs to
Log::Dispatch::FileRotate and log_message issues a warning.
- multiple dispatchers are in logit() at the same time.
- Abstract locking functions into Log::Dispatch::FileRotoate::Flock module.
- Remove flock()'ing of the logfile filehandle. Rely on the lock that
we hold on the "lockfile" instead to synchronize writes. [Github #12]
holding a lock on the lockfile when writing the log message.
- Various pod cleanups and enhancements (Thanks Emanuele Tomasi)
- Avoid multiple stat() calls on the same filehandle (Thanks Emanuele Tomasi)
- Add user_constraint option to use a custom function to determine when
rotation happens (Thanks Emanuele Tomasi).
- Move rotation code into its own function (Thanks Emanuele Tomasi)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 15 05:42:33 UTC 2017 - coolo@suse.com Tue Aug 15 05:42:33 UTC 2017 - coolo@suse.com

View File

@@ -17,7 +17,7 @@
Name: perl-Log-Dispatch-FileRotate Name: perl-Log-Dispatch-FileRotate
Version: 1.30 Version: 1.34
Release: 0 Release: 0
%define cpan_name Log-Dispatch-FileRotate %define cpan_name Log-Dispatch-FileRotate
Summary: Log to Files that Archive/Rotate Themselves Summary: Log to Files that Archive/Rotate Themselves
@@ -33,7 +33,6 @@ BuildRequires: perl-macros
BuildRequires: perl(Date::Manip) BuildRequires: perl(Date::Manip)
BuildRequires: perl(Log::Dispatch::File) BuildRequires: perl(Log::Dispatch::File)
BuildRequires: perl(Log::Dispatch::Output) BuildRequires: perl(Log::Dispatch::Output)
BuildRequires: perl(Params::Validate)
BuildRequires: perl(Path::Tiny) >= 0.018 BuildRequires: perl(Path::Tiny) >= 0.018
BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Warn) BuildRequires: perl(Test::Warn)
@@ -41,58 +40,14 @@ BuildRequires: perl(version)
Requires: perl(Date::Manip) Requires: perl(Date::Manip)
Requires: perl(Log::Dispatch::File) Requires: perl(Log::Dispatch::File)
Requires: perl(Log::Dispatch::Output) Requires: perl(Log::Dispatch::Output)
Requires: perl(Params::Validate)
Requires: perl(version) Requires: perl(version)
%{perl_requires} %{perl_requires}
%description %description
This module provides a simple object for logging to files under the This module extends the base class Log::Dispatch::Output to provides a
Log::Dispatch::* system, and automatically rotating them according to simple object for logging to files under the Log::Dispatch::* system, and
different constraints. This is basically a Log::Dispatch::File wrapper with automatically rotating them according to different constraints. This is
additions. To that end the arguments basically a Log::Dispatch::File wrapper with additions.
name, min_level, filename and mode
behave the same as Log::Dispatch::File. So see its man page (perldoc
Log::Dispatch::File)
The arguments size and max specify the maximum size and maximum number of
log files created. The size defaults to 10M and the max number of files
defaults to 1. If DatePattern is not defined then we default to working in
size mode. That is, use size values for deciding when to rotate.
Once DatePattern is defined FileRotate will move into time mode. Once this
happens file rotation ignores size constraints, unless check_both, and uses
the defined date pattern constraints.
If you setup a config file using Log::Log4perl::init_and_watch() or the
like, you can switch between modes just by commenting out the DatePattern
line.
When using DatePattern make sure TZ is defined correctly and that the TZ
you use is understood by Date::Manip. We use Date::Manip to generate our
recurrences. Bad TZ equals bad recurrences equals surprises! Read the
Date::Manip man page for more details on TZ.
DatePattern will default to a daily rotate if your entered pattern is
incorrect. You will also get a warning message.
If you have multiple writers that were started at different times you will
find each writer will try to rotate the log file at a recurrence calculated
from its start time. To sync all the writers just use a config file and
update it after starting your last writer. This will cause
Log::Dispatch::FileRotate->new() to be called by each of the writers close
to the same time, and if your recurrences aren't too close together all
should sync up just nicely.
I initially assumed a long running process but it seems people are using
this module as part of short running CGI programs. So, now we look at the
last modified time stamp of the log file and compare it to a previous
occurance of a DatePattern, on startup only. If the file stat shows the
mtime to be earlier than the previous recurrance then I rotate the log
file.
We handle multiple writers using flock().
%prep %prep
%setup -q -n %{cpan_name}-%{version} %setup -q -n %{cpan_name}-%{version}