Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Debug with FCGI

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


ankolev at gmail

Aug 1, 2008, 3:45 AM

Post #1 of 8 (3880 views)
Permalink
Debug with FCGI

Hi all.
I run my cat app as standalone FCGI server+apache2:
script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5

How can i run it in debug mode same as catalyst development server?

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


onken at houseofdesign

Aug 1, 2008, 4:28 AM

Post #2 of 8 (3731 views)
Permalink
Re: Debug with FCGI [In reply to]

Am 01.08.2008 um 12:45 schrieb Angel Kolev:

> Hi all.
> I run my cat app as standalone FCGI server+apache2:
> script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5
>
> How can i run it in debug mode same as catalyst development server?
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/


Try CATALYST_DEBUG=1 script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


chris at chrisdolan

Aug 1, 2008, 5:40 AM

Post #3 of 8 (3732 views)
Permalink
Re: Debug with FCGI [In reply to]

On Aug 1, 2008, at 6:28 AM, Moritz Onken wrote:

> Try CATALYST_DEBUG=1 script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5
>

Prefixing "env CATALYST_DEBUG=1" will work in more shells than just
"CATALYST_DEBUG=1".
Chris

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


ankolev at gmail

Aug 1, 2008, 5:55 AM

Post #4 of 8 (3739 views)
Permalink
Re: Debug with FCGI [In reply to]

Chris Dolan wrote:
> On Aug 1, 2008, at 6:28 AM, Moritz Onken wrote:
>
>> Try CATALYST_DEBUG=1 script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5
>>
>
> Prefixing "env CATALYST_DEBUG=1" will work in more shells than just
> "CATALYST_DEBUG=1".
> Chris
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
Doesn`t work too. All debug output goes to apache log. I tryed with -e
option - same result.

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


peter at peknet

Aug 1, 2008, 6:57 AM

Post #5 of 8 (3728 views)
Permalink
Re: Debug with FCGI [In reply to]

On 08/01/2008 07:55 AM, Angel Kolev wrote:

> Doesn`t work too. All debug output goes to apache log. I tryed with -e
> option - same result.

Look at Catalyst::Log::Log4perl if you want to send debugging output somewhere different
than stderr.

I have this in MyApp.pm just before my setup() call:

unless ( $ENV{LOG4PERL} && $ENV{LOG4PERL} eq 'local' ) {
require Catalyst::Log::Log4perl;
__PACKAGE__->log(
Catalyst::Log::Log4perl->new(
__PACKAGE__->path_to('log4perl.conf') . ''
)
);
}

and then my log4perl.conf file:

log4perl.rootLogger=DEBUG, LOGFILE
log4perl.appender.LOGFILE=Log::Log4perl::Appender::File
log4perl.appender.LOGFILE.filename=/path/to/myapp.debug_log
log4perl.appender.LOGFILE.mode=append
log4perl.appender.LOGFILE.layout=PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern=[%r] %F %L %c - %m%n


and finally, I start up my test server like:

LOG4PERL=local perl script/myapp_server.pl

so that the normal Catalyst log() feature is used.

--
Peter Karman . peter [at] peknet . http://peknet.com/


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


paikkos at googlemail

Aug 1, 2008, 7:06 AM

Post #6 of 8 (3728 views)
Permalink
Re: Debug with FCGI [In reply to]

2008/8/1 Peter Karman <peter [at] peknet>:
>
>
> On 08/01/2008 07:55 AM, Angel Kolev wrote:
>
>> Doesn`t work too. All debug output goes to apache log. I tryed with -e
>> option - same result.

Isn't debug configurable?

__PACKAGE__->setup(qw/
-Debug
...........
);

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


jon at jrock

Aug 1, 2008, 8:34 AM

Post #7 of 8 (3729 views)
Permalink
Re: Debug with FCGI [In reply to]

* On Fri, Aug 01 2008, Angel Kolev wrote:
> Doesn`t work too. All debug output goes to apache log. I tryed with -e
> option - same result.

Use the "keep error" option, -e.

Regards,
Jonathan Rockway

--
print just => another => perl => hacker => if $,=$"

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


jon at jrock

Aug 1, 2008, 8:54 AM

Post #8 of 8 (3734 views)
Permalink
Re: Debug with FCGI [In reply to]

* On Fri, Aug 01 2008, Jonathan Rockway wrote:
> * On Fri, Aug 01 2008, Angel Kolev wrote:
>> Doesn`t work too. All debug output goes to apache log. I tryed with -e
>> option - same result.
>
> Use the "keep error" option, -e.

Hmm, I should read the whole post before I reply. Anyway, it should work.

--
print just => another => perl => hacker => if $,=$"

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.