I would say setting $app->mode("...") is a bad idea. You probably want to
change the mode from the outside instead. Try setting MOJO_MODE before
starting the application:
MOJO_MODE=production ./script/yourapp daemon --listen http://*:3000
https://metacpan.org/pod/Mojolicious#mode
The operating mode for your application, defaults to a value from the
MOJO_MODE and PLACK_ENV environment variables or development. Right before
calling "startup" <https://metacpan.org/pod/Mojolicious#startup>,Mojolicious
<https://metacpan.org/pod/Mojolicious> will pick up the current mode, name
the log file after it and raise the log level from debug to info if it has
a value other than development.
The only exception to the rule above is that "hypnotoad" set MOJO_MODE to
"production" unless set to something else from the outside.
On Friday, July 4, 2014 8:13:35 PM UTC+2, Renato Forti wrote:
>
> Hi, All,
>
> How I can deactivate debug log of my server! Put it on production!
>
> I did try this:
>
> $self->mode('production'); # on lib/MyApp.pm
>
> But log continues like this:
>
> [Fri Jul 4 15:07:14 2014] [debug] Rendering template
> "PDDBx002-fav-pt-br.html.ep".
> Use of uninitialized value in string eq at template build.html.ep line 389.
> [Fri Jul 4 15:07:14 2014] [debug] Rendering template
> "PDDBx002-header-pt-br.html.ep".
> "my" variable $size masks earlier declaration in same scope at template
> PDDBx002-header-pt-br.html.ep line 76.
> [Fri Jul 4 15:07:14 2014] [debug] Rendering template
> "auth-check.html.ep". Use of uninitialized value $did in string eq at
> template auth-check.html.ep line
> 15.
> Use of uninitialized value in string ne at template
> PDDBx002-header-pt-br.html.ep line 9.
> [Fri Jul 4 15:07:14 2014] [debug] Template
> "PDDBx002-extended-page.html.ep" not found.
> Use of uninitialized value $extended_page in string eq at template
> build.html.ep line 406.
> [Fri Jul 4 15:07:14 2014] [debug] Rendering template
> "default-page.html.ep".
> [Fri Jul 4 15:07:14 2014] [debug] Template
> "PDDBx002-left-menu-default-pt-br.html.ep" not found.
> Use of uninitialized value $left_menu_default_render in string eq at
> template default-page.html.ep line 15.
> [Fri Jul 4 15:07:14 2014] [debug] Rendering template
> "left-menu-default-pt-br.html.ep".
> [Fri Jul 4 15:07:14 2014] [debug] Rendering template
> "PDDBx002-left-menu-pt-br.html.ep".
> [Fri Jul 4 15:07:14 2014] [debug] Rendering template
> "PDDBx002-pt-br.html.ep".Use of uninitialized value in string eq at
> template PDDBx002-pt-br.html.ep line 13.
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.