/[Frey]/trunk/lib/Frey/Bootstrap.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/Frey/Bootstrap.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations)
Wed Nov 26 07:57:12 2008 UTC (15 years, 4 months ago) by dpavlin
File size: 357 byte(s)
refactor Frey::Boostrap from Frey::Server to have correct warn handling

- we now use File::Tee to capture STDERR to file and display that
  (with filtering) for display
- added FREY_NO_LOG enviroment variable to disable logging (for perl -c)
- move all warnings handling into Frey::Web->warnings_html
- make Frey->debug Int (this touched a bunch of tests)
1 package Frey::Bootstrap;
2
3 =head1 DESCRIPTION
4
5 Bootstrap L<Frey> framework into existence
6
7 =cut
8
9 use File::Tee qw/tee/;
10 use Carp qw/croak/;
11
12 our $log_path;
13
14 if ( ! $log_path && ! $ENV{FREY_NO_LOG}) {
15 $log_path ||= 'var/log/' . time() . '.log';
16
17 tee STDERR, {
18 # prefix => $0 . "[$$]: ",
19 reopen => $log_path,
20 };
21
22 warn "# tee STDERR -> $log_path";
23 }
24
25 1;

  ViewVC Help
Powered by ViewVC 1.1.26