devel/p5-Mojo-Log-Clearable: Add new port

Mojo::Log is a simple logger class. It holds a filehandle once it writes to
a log, and changing "path" in Mojo::Log does not open a new filehandle for
logging.

Mojo::Log::Role::Clearable is a role that provides a "clear_handle" method
and automatically calls it when "path" in Mojo::Log is modified, so the logging
handle is reopened at the new path. The "clear_handle" method can also be used
to reopen the logging handle after log rotation.

This new Perl module is useful for anyone who wants to use Mojo::Log and also
needs automatic log file rotation.

WWW: https://metacpan.org/release/Mojo-Log-Clearable
This commit is contained in:
Jimmy Olgeni 2023-04-24 10:30:42 +02:00
parent b99e13419d
commit ff57d9fddd
5 changed files with 41 additions and 0 deletions

View file

@ -2891,6 +2891,7 @@
SUBDIR += p5-Module-Versions
SUBDIR += p5-Module-Versions-Report
SUBDIR += p5-Mojo-Base-XS
SUBDIR += p5-Mojo-Log-Clearable
SUBDIR += p5-Mojolicious-Plugin-NYTProf
SUBDIR += p5-Moo
SUBDIR += p5-MooX-Aliases

View file

@ -0,0 +1,23 @@
PORTNAME= Mojo-Log-Clearable
PORTVERSION= 1.001
CATEGORIES= devel perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:DBOOK
PKGNAMEPREFIX= p5-
MAINTAINER= olgeni@FreeBSD.org
COMMENT= Log rotation role for Mojo::Log
WWW= https://metacpan.org/pod/Mojo::Log::Clearable
LICENSE= ART20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-Mojolicious>9:www/p5-Mojolicious
USES= perl5
NO_ARCH= yes
USE_PERL5= modbuildtiny
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1682323627
SHA256 (Mojo-Log-Clearable-1.001.tar.gz) = 82e06a29d59e99ce260bfc69efb59deea795da246a638c2b439351b07b6c0a72
SIZE (Mojo-Log-Clearable-1.001.tar.gz) = 13270

View file

@ -0,0 +1,10 @@
Mojo::Log is a simple logger class. It holds a filehandle once it writes to
a log, and changing "path" in Mojo::Log does not open a new filehandle for
logging.
Mojo::Log::Role::Clearable is a role that provides a "clear_handle" method
and automatically calls it when "path" in Mojo::Log is modified, so the
logging handle is reopened at the new path.
The "clear_handle" method can also be used to reopen the logging handle
after log rotation.

View file

@ -0,0 +1,4 @@
%%SITE_PERL%%/Mojo/Log/Clearable.pm
%%SITE_PERL%%/Mojo/Log/Role/Clearable.pm
%%PERL5_MAN3%%/Mojo::Log::Clearable.3.gz
%%PERL5_MAN3%%/Mojo::Log::Role::Clearable.3.gz