GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mojo::Log::Clearable(3) User Contributed Perl Documentation Mojo::Log::Clearable(3)

Mojo::Log::Clearable - Mojo::Log with clearable log handle

 use Mojo::Log::Clearable;
 my $log = Mojo::Log::Clearable->new(path => $path1);
 $log->info($message); # Logged to $path1
 $log->path($path2);
 $log->debug($message); # Logged to $path2
 $log->path(undef);
 $log->warn($message); # Logged to STDERR
 
 # Reopen filehandle after logrotate (if logrotate sends SIGUSR1)
 $SIG{USR1} = sub { $log->clear_handle };

Mojo::Log::Clearable is a subclass of Mojo::Log that applies the Mojo::Log::Role::Clearable role. See that role's documentation for details.

Dan Book, "dbook@cpan.org"

Copyright 2015, Dan Book.

This library is free software; you may redistribute it and/or modify it undef the terms of the Artistic License version 2.0.

Mojo::Log, Mojo::Log::Role::Clearable

2021-06-16 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.