From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs61548bkj; Wed, 17 Jun 2009 22:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.140.143.13 as permitted sender) client-ip=10.140.143.13; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.140.143.13 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.140.143.13]) by 10.140.143.13 with SMTP id q13mr137325rvd.1.1245304511321 (num_hops = 1); Wed, 17 Jun 2009 22:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :dkim-signature:domainkey-signature:mime-version:received :in-reply-to:references:from:date:message-id:subject:to:content-type :content-transfer-encoding:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; bh=vBhfFO8KWc7Vv4Oia/nS9v58KaU9t7Bi0l7HRRx6Mjw=; b=i0mekkwSgmBxfrjL/0DNLGfTd10pILU9jrqssWf4k/YwY/sNXnFfroQnpXOQhFkBZO r3hzzwfTa4KCuCupQam8wrnKr0OQzG+2wH6gFPN9ZP43cS7vyqKP9QoXxyulMbfysIro vezeixr+Gb02qdhdp/1ItHYO6hqgP7xfIuFUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :dkim-signature:domainkey-signature:mime-version:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=Jhtk7Dq9j6GaQ1PzP5uAcGCARVgkzehLOzwMUqCsbhMPT1mFxhU/8FTChG0LIhIK+7 Ol5UsR619h9DbrgM8+SDdlNK4jJuHXFSZUn61yN8cBAUjZofsBVb3hDa1vzL5/qg/QHk kurvlMT/KIG06AQwSvX6NPZWxpsJJuOcaSwz8= Received: by 10.140.143.13 with SMTP id q13mr14730rvd.1.1245304511132; Wed, 17 Jun 2009 22:55:11 -0700 (PDT) Received: by 10.107.155.38 with SMTP id h38gr1461pro.0; Wed, 17 Jun 2009 22:55:01 -0700 (PDT) X-Sender: m.fellinger@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.114.196.13 with SMTP id t13mr130037waf.16.1245304500167; Wed, 17 Jun 2009 22:55:00 -0700 (PDT) Return-Path: Received: from mail-pz0-f199.google.com (mail-pz0-f199.google.com [209.85.222.199]) by gmr-mx.google.com with ESMTP id m37si480726waf.4.2009.06.17.22.54.59; Wed, 17 Jun 2009 22:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of m.fellinger@gmail.com designates 209.85.222.199 as permitted sender) client-ip=209.85.222.199; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of m.fellinger@gmail.com designates 209.85.222.199 as permitted sender) smtp.mail=m.fellinger@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-pz0-f199.google.com with SMTP id 37so780760pzk.2 for ; Wed, 17 Jun 2009 22:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=HE9qd2IsSD9FazhZGcQ2X43Y9N5I1sW3pGLd9jcJWS8=; b=p53WV5uEqtJkGGOES/t+FQbKmP7JdINB7Sbos6bkqSG/bZh9sa9F5tRlGUUjkLGOz8 Lhn5QCY1hIvf05gdnL1q6hAlhFTiGGHq8ZJ3TDa8RPfxEYrHAu1Ax/5AbUEs6ZGWGrXJ YzRDUKc21SgCM87hSMVAKRskn+nKmwtzu3Uzw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=E/ajT13Sebdou5roSfHL9/KcEMMxjy+hDkJiG9x+6+io4Vjvuh7lJlvDm1ZkfjElEH nn53N1LdxUZ7A1XzR8GdsqjrnO6piZLZ7MZo1vTKmfaE1f44sY0XcB0r+5D0MOgrVnYX U8cPKlJDNb6HBf8pTuL8+2HOYCdVc2CaZjqDU= MIME-Version: 1.0 Received: by 10.142.70.11 with SMTP id s11mr882630wfa.141.1245304499108; Wed, 17 Jun 2009 22:54:59 -0700 (PDT) In-Reply-To: <5976e8970906172049q17f7b9aetd9bb00b64c89430d@mail.gmail.com> References: <5976e8970906172049q17f7b9aetd9bb00b64c89430d@mail.gmail.com> From: Michael Fellinger Date: Thu, 18 Jun 2009 14:54:39 +0900 Message-ID: <9c00d3e00906172254v2ef00a90m22e49e197b9742cb@mail.gmail.com> Subject: Re: Common Logger Help To: rack-devel@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com On Thu, Jun 18, 2009 at 12:49 PM, Greg Melton wrote: > Is there anyway to configure the common logger to output to a file? require 'logger' use Rack::CommonLogger, Logger.new('/some/file/somewhere.log') Hope that helps, didn't actually check it, but that's the general direction you should go :) > I can see one of the options when calling rackup is a placeholder for an > access log. > > options =3D {:Port =3D> 9292, :Host =3D> "0.0.0.0", :AccessLog =3D> []} > > From what I can tell this isn't used anywhere. > > I've tried this and it works up until you run a rackup app daemonized: > > rackup config.ru > /full/path/file.log > > Once daemonized the following lines are called: > > =C2=A0=C2=A0=C2=A0 STDIN.reopen "/dev/null" > =C2=A0=C2=A0=C2=A0 STDOUT.reopen "/dev/null", "a" > =C2=A0=C2=A0=C2=A0 STDERR.reopen "/dev/null", "a" > > I'm assuming this kills the outputing so it never reaches the log file. I > know the path is change to root during the daemonization. > > I've experimented with commenting out the STDOUT line above and I've had > mixed results in different environments. I was hoping a solution existed > without having to touch the rack code base. > > Any help would be greatly appreciated. > > Thanks, > Greg