Обсуждение: About logging

Поиск
Список
Период
Сортировка

About logging

От
arvindwill@gmail.com
Дата:
Is it possible to log two different information to two different file.
Bascially i need to log all the mod statement in one log csv file and all the queries running more then 2mins in another csv log file. As i enabled both it will be doing both in single file rt . Is there any way to split both???

Re: About logging

От
Magnus Hagander
Дата:
On Thu, Sep 24, 2009 at 21:06,  <arvindwill@gmail.com> wrote:
> Is it possible to log two different information to two different file.
> Bascially i need to log all the mod statement in one log csv file and all
> the queries running more then 2mins in another csv log file. As i enabled
> both it will be doing both in single file rt . Is there any way to split
> both???

This is not currently possible inside PostgreSQL, you will need to do
external post-processing of the logfile to get that.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: About logging

От
S Arvind
Дата:
ok thanks Magnus from saving my time in googling....

-Arvind S

"Many of lifes failure are people who did not realize how close they were to success when they gave up."
-Thomas Edison


On Fri, Sep 25, 2009 at 12:39 AM, Magnus Hagander <magnus@hagander.net> wrote:
On Thu, Sep 24, 2009 at 21:06,  <arvindwill@gmail.com> wrote:
> Is it possible to log two different information to two different file.
> Bascially i need to log all the mod statement in one log csv file and all
> the queries running more then 2mins in another csv log file. As i enabled
> both it will be doing both in single file rt . Is there any way to split
> both???

This is not currently possible inside PostgreSQL, you will need to do
external post-processing of the logfile to get that.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: About logging

От
Scott Marlowe
Дата:
On Thu, Sep 24, 2009 at 1:09 PM, Magnus Hagander <magnus@hagander.net> wrote:
> On Thu, Sep 24, 2009 at 21:06,  <arvindwill@gmail.com> wrote:
>> Is it possible to log two different information to two different file.
>> Bascially i need to log all the mod statement in one log csv file and all
>> the queries running more then 2mins in another csv log file. As i enabled
>> both it will be doing both in single file rt . Is there any way to split
>> both???
>
> This is not currently possible inside PostgreSQL, you will need to do
> external post-processing of the logfile to get that.

I bet it wouldn't be hard to mangle apache's log rotator to do
something like put all entries with DB1 at the start to one file and
all the others in another file.