Mailing List Archive

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@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
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@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/


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

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
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@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
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@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> 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@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
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@peknet.com . http://peknet.com/


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
Re: Debug with FCGI [ In reply to ]
2008/8/1 Peter Karman <peter@peknet.com>:
>
>
> 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@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
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@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
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@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/