Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Disable Plack::Middleware::AccessLog

by 1nickt (Canon)
on Apr 18, 2021 at 00:09 UTC ( [id://11131415]=perlquestion: print w/replies, xml ) Need Help??

1nickt has asked for the wisdom of the Perl Monks concerning the following question:

Learned friends,

The doc for Plack::Middleware::AccessLog states This middleware is enabled by default when you run plackup as a default development environment.

I am wanting to run another middleware for logging and thus wish to disable the default. Can anyone tell how?

Thanks!


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re: Disable Plack::Middleware::AccessLog
by Your Mother (Archbishop) on Apr 18, 2021 at 00:18 UTC

    I think, but this is untested, the easiest way is just to not run it as development; plackup. Not positive that addresses your case.

    -E, --env, the PLACK_ENV environment variable.

    Specifies the environment option. Setting this value with -E or --env also writes to the PLACK_ENV environment variable. This allows applications or frameworks to tell which environment setting the application is running on.

    # These two are the same plackup -E deployment env PLACK_ENV=deployment plackup

    Common values are development, deployment, and test. The default value is development, which causes plackup to load the middleware components: AccessLog, StackTrace, and Lint unless --no-default-middleware is set.

      Thanks, your mention of --no-default-middleware triggered a memory.


      The way forward always starts with a minimal test.
Re: Disable Plack::Middleware::AccessLog
by Anonymous Monk on Apr 18, 2021 at 07:48 UTC

      Thank you very much for the link and the hint.


      The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11131415]
Approved by jcb
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found