Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXVtr-0001ZP-2k for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Sep 2015 14:54:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZXVtq-0000wE-Kk for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Sep 2015 14:54:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZXPpH-0003q4-FX for pgsql-bugs@postgresql.org; Thu, 03 Sep 2015 08:24:55 +0000 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZXPpA-0000KW-1q for pgsql-bugs@postgresql.org; Thu, 03 Sep 2015 08:24:54 +0000 Received: by wicmc4 with SMTP id mc4so11287111wic.0 for ; Thu, 03 Sep 2015 01:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Mtf0KIh69RvTWsskeolEMRAaKZtCppiPgJQn9/MgBJg=; b=y4gxwBaSlhKXewESRC9X4c8PR5pO1LMDmCayvtc4guwnDB8mNoUMcv3KbbDe1FaGDN 1GJJObYkGVNxY8pSajadOkR5LdDdVnG3S66aWeNFTHZIxAX7UozafwvBbRjm6dWVBh1L Z5UzAkT0rHhTYiw//EvgjtOx5WuQsltWXjCQZVZFTDxV8KBMUERySWE+0ox2SIghHf0/ oH5vnOzv77UFV7DWz8aaQRd5MqMpcT4GM+JDg6r1vrPAPfm5Au4aLE4aND+IA4mKK4hg vUbfhlvUYccIttYE1dEFzgRyw5wzBqcg/yZjafCOOV1VBLzL5pL5HoOHgOS1+oTHWRXm MMyw== X-Received: by 10.180.84.65 with SMTP id w1mr12005982wiy.62.1441268687495; Thu, 03 Sep 2015 01:24:47 -0700 (PDT) Received: from [192.168.1.36] (dsl-85-10-109-45.internet.lu. [85.10.109.45]) by smtp.googlemail.com with ESMTPSA id lg6sm36502971wjb.10.2015.09.03.01.24.46 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Sep 2015 01:24:47 -0700 (PDT) Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe To: Michael Paquier References: <20150828104658.2089.83265@wrigleys.postgresql.org> <55E46B04.7070102@gmail.com> Cc: PostgreSQL mailing lists From: Egon Kocjan Message-ID: <55E803D1.9090004@gmail.com> Date: Thu, 3 Sep 2015 10:24:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 1.9.2015 3:43, Michael Paquier wrote: > On Mon, Aug 31, 2015 at 11:56 PM, Egon Kocjan wrote: >> 2) However there is no output on stderr when pg_ctl is running as a >> subprocess of a service. So I would still have to patch pg_ctl if I want >> stderr. I haven't looked into elog.c yet, maybe stderr from there would be >> good to have as well? So far, pg_ctl output and pg_logs\* was enough for me >> to debug the installations. Technically, I could also monitor Windows event >> log and dump events on the fly into my report file. But it seems simpler to >> just patch PostgreSQL locally to force stderr and reuse all the logic from >> the Unix port... > I wished we had such a switch a couple of times and I have as well > some code paths that would benefit a redirection of those logs to > stderr instead of the event log. Still this sounds like a new feature > to me. Hence, what about for example adding a Windows-only option that > can be used to enforce where logs are redirected, let's say > --log-output with the following values: > - default, which is what we have now > - stderr, to enforce the output to stderr > - eventlog, to enforce redirection to the event logs. > Would you like to work on this patch? > Yes, I would start with pg_ctl itself. Then we can look into what else needs to be done for the backend, I'm not yet 100% sure how it all fits together. Regards Egon -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs