couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Carlson <lancecarl...@gmail.com>
Subject Re: Custom log format
Date Thu, 28 Feb 2013 23:09:20 GMT
I wonder if this could be turned into a config setting or something.
I'd just worry about the overhead of having the load the format.
Though the log format could be cached on boot.

Sent from my iPhone

On Feb 28, 2013, at 6:06 PM, Anthony Ananich <anton.ananich@inpun.com> wrote:

> Found answer in couch_log.erl
>
> get_log_messages(Pid, Level, Format, Args) ->
>    ConsoleMsg = unicode:characters_to_binary(io_lib:format(
>        "[~s] [~p] " ++ Format ++ "~n", [Level, Pid | Args])),
>    FileMsg = ["[", couch_util:rfc1123_date(), "] ", ConsoleMsg],
>    {ConsoleMsg, iolist_to_binary(FileMsg)}.
>
> So FileMsg is hardcoded.
>
> On Fri, Mar 1, 2013 at 1:16 AM, Anthony Ananich <anton.ananich@inpun.com> wrote:
>> Hi!
>>
>> I wonder if it is possible to change couch.log file format to Apache's
>> log file format?
>>
>> I need this to be able to use log file analyzer tools like AWStats.
>>
>> I found that handle_log_req could be customized, but I guess that it
>> just reads log file and send it's part over HTTP.
>>
>> Thanks,
>> Anthony

Mime
View raw message