> > > I suspect one of those lines could be the result of
> > > Rack::CommonLogger from RACK_ENV=deployment or similar
> > > (which matched "rackup" defaults back in 2009).
> > >

Yes I just tried this and it fixed the issue (I used -N but
RACK_ENV=none also worked)

Just wondering what other things will be impacted by turning off rack
middleware?


On Wed, 7 Jul 2021 at 09:38, Eric Wong <[email protected]> wrote:
>
> Cenon Del Rosario <[email protected]> wrote:
> > > I suspect that needs "logger()" around it, like so:
> > >     logger(Logger.new($stderr).tap do |newlgr|
> > >       newlgr.formatter = JsonLogFormatter.new
> > >     end)
> >
> > Sorry for incomplete code snippets but yes I do have this (I was doing
> > it for either stdout or stderr) and it did not make a difference.
>
> OK, did you see my other paragraph about Rack::CommonLogger?
> (reposted below)
>
> > > > For the most part it works and I get the stdout and stderr in json but
> > > > I also see some other non-json formatted messages, for example:
> > > > {"time":"2021-07-06 17:14:01
> > > > +1000","severity":"INFO","source":"","message":"Started GET \"/admin\"
> > > > for 127.0.0.1 at 2021-07-06 17:14:01 +1000"}
> > > > 127.0.0.1 - - [06/Jul/2021 17:14:01] "GET /admin HTTP/1.1" 301 102 
> > > > 0.4243
> > >
> > > I suspect one of those lines could be the result of
> > > Rack::CommonLogger from RACK_ENV=deployment or similar
> > > (which matched "rackup" defaults back in 2009).
> > >
> > > Personally, I always used something non-standard like "RACK_ENV=none"
> > > to disable all default Rack middleware (--no-default-middleware
> > > exists nowadays, too).

-- 
The information contained in this e-mail message and any accompanying files 
is or may be confidential. If you are not the intended recipient, any use, 
dissemination, reliance, forwarding, printing or copying of this e-mail or 
any attached files is unauthorised. This e-mail is subject to copyright. No 
part of it should be reproduced, adapted or communicated without the 
written consent of the copyright owner. If you have received this e-mail in 
error please advise the sender immediately by return e-mail or telephone 
and delete all copies. Nine Group does not guarantee the accuracy or 
completeness of any information contained in this e-mail or attached files. 
Internet communications are not secure, therefore Nine Group does not 
accept legal responsibility for the contents of this message or attached 
files.

Reply via email to