clogger RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@yhbt.net>
To: Josh Natanson <josh@natanson.net>
Cc: clogger-public@yhbt.net
Subject: Re: Clogger request_time formatting
Date: Thu, 9 Jul 2020 20:28:20 +0000	[thread overview]
Message-ID: <20200709202820.GA30471@dcvr> (raw)
In-Reply-To: <CAPdx2szjqUuFjUtrgoeXXwmz0HzfdnWe+2h2Sp_ywDkTDVL0-g@mail.gmail.com>

Josh Natanson <josh@natanson.net> wrote:
> Hi,
> 
> I'm looking to use clogger for some access logging, and I need to
> match a legacy format within my organization.  I've managed to
> recreate everything I need to, with one exception.  $request_time
> looks like it returns seconds, and I need to display microseconds.  I
> see that precision is supported, but I haven't been able to figure out
> a way to change the actual format.
> 
> My questions are: Is there a way to do this that I'm not aware of?  If
> not, could it be added?  I can try to take a crack at it if you think
> it's a good idea.

Hi Josh, does $request_time{6} work?

From the README:

    * $request_time, $request_time{PRECISION} - time taken for request
      (including response body iteration).  PRECISION defaults to 3
      (milliseconds) if not specified but may be specified anywhere from
      0(seconds) to 6(microseconds).

Or is the "." component not desirable?

I suppose something like $request_time{6,0} could be added
(Multiply by 10**6, PRECISION=0)

  reply	other threads:[~2020-07-09 20:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 16:30 Clogger request_time formatting Josh Natanson
2020-07-09 20:28 ` Eric Wong [this message]
     [not found]   ` <CAPdx2syEU5WLBx9PezfQ6nFdpnouscXwnm-bg0+t5ERi7EPnJg@mail.gmail.com>
2020-07-09 22:57     ` Eric Wong
2020-07-26  4:46 ` Eric Wong
2020-07-27 15:15   ` Josh Natanson
2020-07-27 18:38     ` Eric Wong
2020-07-28 13:50       ` Josh Natanson
2020-07-29  9:20         ` Eric Wong
2020-07-29 19:50           ` Josh Natanson
2020-07-30  3:54             ` Eric Wong
2020-07-31 14:08               ` Josh Natanson
2020-07-31 14:09                 ` Josh Natanson
2020-07-31 19:44                 ` Eric Wong
2020-08-02 13:47                   ` Josh Natanson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/clogger/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200709202820.GA30471@dcvr \
    --to=e@yhbt.net \
    --cc=clogger-public@yhbt.net \
    --cc=josh@natanson.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/clogger.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).