Re: get current log file

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Armor <yupengstone(at)qq(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: get current log file
Date: 2016-02-26 14:35:52
Message-ID: 56D062C8.2070704@timbira.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26-02-2016 08:03, Robert Haas wrote:
> I don't think we're going to accept this feature if it might fail in
> corner cases. And that design seems awfully complex.
>
Agree.

> The obvious way to implement this, to me at least, seems to be for the
> syslogger to write a file someplace in the data directory containing
> the name of the current log file. When it switches log files, it
> rewrites that file. When you want to know what the current logfile
> is, you read that file.
>
That is not an elegant solution but it is simple. However, it is another
file in PGDATA. I can live with that but if we have consensus, let's do
it optional.

> But there's one thing I'm slightly baffled about: why would you
> actually need this?
>
The use case I have in mind is consume log file by using a tool like
logstash. In this case, logstash accepts patterns and you can also use
syslog for it.

--
Euler Taveira Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shulgin, Oleksandr 2016-02-26 14:41:07 Re: [PATH] Correct negative/zero year in to_date/to_timestamp
Previous Message Ivan Kartyshov 2016-02-26 14:24:08 Re: [PATH] Correct negative/zero year in to_date/to_timestamp