FAQ
Hey guys,

i want to deploy my c-app by using the dev-server myapp_server.pl. while
the development i went into the dir myapp and typed
script/myapp_server.pl -r -d
so far, so good, but now i want to start this server via an init.d
script under open-suse 9.2, so i wrote the script by using the skeleton.
but now my problem, if i start the dev-server from out of an other path
like "/" or try to start the server with the abs path
/var/www/myapp/myapp_server.pl, the server starts, but there a errors on
much... like template.tt2 could not be found and so on...

so, where do i have to set a "HOME" oder "PATH" var, so that i can run
the dev server from any fs-point?

Search Discussions

  • Lindolfo "Lorn" Rodrigues at Jul 20, 2009 at 4:00 pm
    Try to add this in your view:


    __PACKAGE__->config({
    INCLUDE_PATH => [
    MyApp->path_to( 'root', 'src' ),
    MyApp->path_to( 'root', 'lib' )
    ],
    On Mon, Jul 20, 2009 at 10:40 AM, Christoph Metz wrote:

    Hey guys,

    i want to deploy my c-app by using the dev-server myapp_server.pl. while
    the development i went into the dir myapp and typed
    script/myapp_server.pl -r -d
    so far, so good, but now i want to start this server via an init.d
    script under open-suse 9.2, so i wrote the script by using the skeleton.
    but now my problem, if i start the dev-server from out of an other path
    like "/" or try to start the server with the abs path
    /var/www/myapp/myapp_server.pl, the server starts, but there a errors on
    much... like template.tt2 could not be found and so on...

    so, where do i have to set a "HOME" oder "PATH" var, so that i can run
    the dev server from any fs-point?


    _______________________________________________
    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/


    --
    --Lindolfo "Lorn" Rodrigues
    www.slackwarezine.com.br
    http://lornlab.org
    http://sao-paulo.pm.org
    use Catalyst;
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090720/2dbb9dd7/attachment.htm
  • Lindolfo "Lorn" Rodrigues at Jul 20, 2009 at 4:05 pm
    Ops, sent to fast

    Of couse you will put your path in path_to, i copy this from TTSite :)

    On Mon, Jul 20, 2009 at 1:00 PM, Lindolfo "Lorn" Rodrigues <lorn.br@
    gmail.com> wrote:
    Try to add this in your view:


    __PACKAGE__->config({
    INCLUDE_PATH => [
    MyApp->path_to( 'root', 'src' ),
    MyApp->path_to( 'root', 'lib' )
    ],

    On Mon, Jul 20, 2009 at 10:40 AM, Christoph Metz wrote:

    Hey guys,

    i want to deploy my c-app by using the dev-server myapp_server.pl. while
    the development i went into the dir myapp and typed
    script/myapp_server.pl -r -d
    so far, so good, but now i want to start this server via an init.d
    script under open-suse 9.2, so i wrote the script by using the skeleton.
    but now my problem, if i start the dev-server from out of an other path
    like "/" or try to start the server with the abs path
    /var/www/myapp/myapp_server.pl, the server starts, but there a errors on
    much... like template.tt2 could not be found and so on...

    so, where do i have to set a "HOME" oder "PATH" var, so that i can run
    the dev server from any fs-point?


    _______________________________________________
    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/


    --
    --Lindolfo "Lorn" Rodrigues
    www.slackwarezine.com.br
    http://lornlab.org
    http://sao-paulo.pm.org
    use Catalyst;


    --
    --Lindolfo "Lorn" Rodrigues
    www.slackwarezine.com.br
    http://lornlab.org
    http://sao-paulo.pm.org
    use Catalyst;
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090720/11a4969e/attachment.htm
  • Tomas Doran at Jul 20, 2009 at 10:11 pm

    On 20 Jul 2009, at 14:40, Christoph Metz wrote:
    so, where do i have to set a "HOME" oder "PATH" var, so that i can run
    the dev server from any fs-point?
    You can use CATALYST_HOME or MYAPP_HOME (replacing MYAPP with your
    capitalised app name with :: changed to _).

    Cheers
    t0m
  • Christoph Metz at Jul 21, 2009 at 10:24 am

    Tomas Doran schrieb:
    On 20 Jul 2009, at 14:40, Christoph Metz wrote:
    so, where do i have to set a "HOME" oder "PATH" var, so that i can run
    the dev server from any fs-point?
    You can use CATALYST_HOME or MYAPP_HOME (replacing MYAPP with your
    capitalised app name with :: changed to _).

    Cheers
    t0m
    Thanks a lot, this solved my problem! :)
  • Christoph Metz at Jul 21, 2009 at 2:41 pm
    Hi,

    i got a Catalyst-App which inits a session on the startpage, after a
    user logged sucessfully in with his login-data. Now, i also use
    Log4Perl to do extensive logging, as far as the app is enough tested. so
    i use the log4perl conf file this way:

    __PACKAGE__->log(Catalyst::Log::Log4perl->new(__PACKAGE__->config->{home}.'/log.conf'));

    where log.conf logs all data into a file myapp.log. There are many
    useful cspecs to show really exact log-entrys but one is missing,
    i want to see which debug/error/warn message was logged by which user.
    so how to pass the logged in user ($c->user->id) into the
    log4perl log-files?
    custom cspecs like descripted on CPAN
    Log::Log4Perl::Layout::PatternLayout are not able to access the
    namespace of my app,
    or at least i am not able to pass the context to the custom-cspecs sub
    in the log4perl conf-file :(
  • Bill Moseley at Jul 23, 2009 at 3:12 am

    On Tue, Jul 21, 2009 at 7:41 AM, Christoph Metz wrote:
    i want to see which debug/error/warn message was logged by which user.

    I'm using this early in the request after I have $user.

    Log::Log4perl::MDC->put( 'user', $user->id );



    --
    Bill Moseley
    moseley@hank.org
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090722/1292a8e6/attachment.htm
  • Jon Schutz at Jul 23, 2009 at 2:25 pm
    Somewhere early on on the request cycle do

    Log::Log4perl::MDC->put( 'user' => $user );

    then insert it into your log messages via your Log4perl configuration
    such as:

    log4perl.appender.Logfile.layout.ConversionPattern: "%d %-5p %c -
    USER:%X{user} - %m%n"

    Christoph Metz wrote:
    Hi,

    i got a Catalyst-App which inits a session on the startpage, after a
    user logged sucessfully in with his login-data. Now, i also use
    Log4Perl to do extensive logging, as far as the app is enough tested. so
    i use the log4perl conf file this way:

    __PACKAGE__->log(Catalyst::Log::Log4perl->new(__PACKAGE__->config->{home}.'/log.conf'));

    where log.conf logs all data into a file myapp.log. There are many
    useful cspecs to show really exact log-entrys but one is missing,
    i want to see which debug/error/warn message was logged by which user.
    so how to pass the logged in user ($c->user->id) into the
    log4perl log-files?
    custom cspecs like descripted on CPAN
    Log::Log4Perl::Layout::PatternLayout are not able to access the
    namespace of my app,
    or at least i am not able to pass the context to the custom-cspecs sub
    in the log4perl conf-file :(



    _______________________________________________
    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/
  • Tomas Doran at Jul 23, 2009 at 5:11 pm

    Jon Schutz wrote:
    Somewhere early on on the request cycle do

    Log::Log4perl::MDC->put( 'user' => $user );

    then insert it into your log messages via your Log4perl configuration
    such as:

    log4perl.appender.Logfile.layout.ConversionPattern: "%d %-5p %c -
    USER:%X{user} - %m%n"
    Doc patches on Catalyst::Log::Log4perl showing how to do this would be
    very welcome.

    Anyone?

    Cheers
    t0m

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJul 20, '09 at 1:40p
activeJul 23, '09 at 5:11p
posts9
users5
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase