clogger 2.2.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.olddoc.yml +12 -10
- data/GIT-VERSION-FILE +1 -1
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +1 -1
- data/LATEST +6 -6
- data/NEWS +33 -0
- data/README +30 -16
- data/clogger.gemspec +3 -3
- data/ext/clogger_ext/clogger.c +35 -2
- data/lib/clogger/pure.rb +5 -12
- data/lib/clogger.rb +9 -2
- data/pkg.mk +2 -1
- data/test/test_clogger.rb +39 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f07e1211c59e3f7ab5272febd94b6f19cc384d9add4043a2fc1815a3d3579518
|
4
|
+
data.tar.gz: bf4af6f34c84c24542831150a159fc4f89f5bbccf39f8b35f81cf0b2fcb1658d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a615c6cb5ad51d3b391dbd2fccfe8c0413d8301cef29789394d06be886a66343ef448e8f6746a651fe17118e807530242fca6cc67b3dac1e41f9a8f03b37be
|
7
|
+
data.tar.gz: 7167c4bd8881f5452e15852e6c51f8e898bdf548d967c322957c31cdf127f9e7fbf8e8ec31f7439b1be398faf629a1ae7d7513a82299717f7a144c05c6f5a607
|
data/.olddoc.yml
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
---
|
2
|
-
rdoc_url: https://
|
3
|
-
cgit_url: https://
|
4
|
-
git_url:
|
5
|
-
public_email: clogger-public@
|
2
|
+
rdoc_url: https://YHBT.net/clogger/
|
3
|
+
cgit_url: https://YHBT.net/clogger.git
|
4
|
+
git_url: https://YHBT.net/clogger.git
|
5
|
+
public_email: clogger-public@YHBT.net
|
6
6
|
ml_url:
|
7
|
-
- https://
|
8
|
-
- http://
|
9
|
-
-
|
7
|
+
- https://YHBT.net/clogger-public/
|
8
|
+
- http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/clogger-public/
|
9
|
+
- imaps://YHBT.net/inbox.comp.lang.ruby.clogger.0
|
10
|
+
- imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.clogger.0
|
11
|
+
- nntps://news.public-inbox.org/inbox.comp.lang.ruby.clogger
|
12
|
+
- nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.clogger
|
10
13
|
source_code:
|
11
|
-
- git clone
|
12
|
-
- git clone
|
13
|
-
- torsocks git clone http://ou63pmih66umazou.onion/clogger.git
|
14
|
+
- git clone https://YHBT.net/clogger.git
|
15
|
+
- torsocks git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/clogger.git
|
data/GIT-VERSION-FILE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
GIT_VERSION = 2.
|
1
|
+
GIT_VERSION = 2.4.0
|
data/GIT-VERSION-GEN
CHANGED
data/GNUmakefile
CHANGED
data/LATEST
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
=== clogger 2.
|
1
|
+
=== clogger 2.4.0 / 2022-06-16 16:53 UTC
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
affordable due to extortionists, soon.
|
3
|
+
Only 2 code changes, neither of which is really relevant for 99% of
|
4
|
+
users using the C extension and strict HTTP parsers.
|
6
5
|
|
7
|
-
|
8
|
-
|
6
|
+
escape env['REQUEST_METHOD'] for non-strict HTTP servers
|
7
|
+
pure: fix time.rb incompatibility in Ruby 3.1+
|
8
|
+
doc: drop git:// URLs, use shorter domain for IMAP links
|
9
9
|
|
data/NEWS
CHANGED
@@ -1,3 +1,36 @@
|
|
1
|
+
=== clogger 2.4.0 / 2022-06-16 16:53 UTC
|
2
|
+
|
3
|
+
Only 2 code changes, neither of which is really relevant for 99% of
|
4
|
+
users using the C extension and strict HTTP parsers.
|
5
|
+
|
6
|
+
escape env['REQUEST_METHOD'] for non-strict HTTP servers
|
7
|
+
pure: fix time.rb incompatibility in Ruby 3.1+
|
8
|
+
doc: drop git:// URLs, use shorter domain for IMAP links
|
9
|
+
|
10
|
+
=== clogger 2.3.1 / 2021-05-25 23:39 UTC
|
11
|
+
|
12
|
+
This release fixes compatibility with GC.compact on Ruby 3.x.
|
13
|
+
Thanks to Ngan Pham for the patch and Aaron Patterson for the
|
14
|
+
feedback for the (obsolete) kgio RubyGem:
|
15
|
+
|
16
|
+
https://yhbt.net/kgio-public/CAAvYYt5Z5f2rMuXO5DMpR1-6uRvu_gXKDvqcyoZ+oNcLiTH39g@mail.gmail.com/T/
|
17
|
+
|
18
|
+
=== clogger 2.3.0 - $request_time{POWER,PRECISION} support / 2020-08-10 23:01 UTC
|
19
|
+
|
20
|
+
The $request_time can now be multiplied by a power-of-10,
|
21
|
+
allowing up to nanosecond resolution without decimals.
|
22
|
+
|
23
|
+
Thanks to Josh Natanson for contributing this feature:
|
24
|
+
|
25
|
+
https://yhbt.net/clogger-public/CAPdx2swO4eaOWaqL4-rMLq1H7pH6w-i760vPJTb92tyKfcc01Q@mail.gmail.com/
|
26
|
+
https://yhbt.net/clogger-public/CAPdx2szjqUuFjUtrgoeXXwmz0HzfdnWe+2h2Sp_ywDkTDVL0-g@mail.gmail.com/T/
|
27
|
+
|
28
|
+
There's also some minor fixes and doc updates:
|
29
|
+
|
30
|
+
clogger: fix _BSD_SOURCE and _SVID_SOURCE deprecation warnings
|
31
|
+
doc: update with IMAPS, NNTPS, and .onion mail archive URLs
|
32
|
+
doc: document Fiber.current
|
33
|
+
|
1
34
|
=== clogger 2.2.1 - move away from .org TLD / 2020-01-08 09:46 UTC
|
2
35
|
|
3
36
|
Just doc and website updates to point our email address
|
data/README
CHANGED
@@ -69,10 +69,12 @@ that receives a "<<" method:
|
|
69
69
|
* $request_uri - the URI requested ($path_info?$query_string)
|
70
70
|
* $request - the first line of the HTTP request
|
71
71
|
($request_method $request_uri $http_version)
|
72
|
-
* $request_time, $request_time{PRECISION} -
|
73
|
-
(including response body iteration).
|
74
|
-
(milliseconds) if not specified but may be specified
|
75
|
-
0(seconds) to 6(microseconds).
|
72
|
+
* $request_time, $request_time{PRECISION}, $request_time{POWER,PRECISION} -
|
73
|
+
time taken for request (including response body iteration). PRECISION
|
74
|
+
defaults to 3 (milliseconds) if not specified but may be specified
|
75
|
+
anywhere from 0(seconds) to 6(microseconds). POWER will raise the time to
|
76
|
+
the provided power of 10, useful for converting to micro- or nanoseconds.
|
77
|
+
POWER defaults to 0 if not specified but may be specified any from 0 to 9
|
76
78
|
* $time_iso8601 - current local time in ISO 8601 format,
|
77
79
|
e.g. "1970-01-01T00:00:00+00:00"
|
78
80
|
* $time_local - current local time in Apache log format,
|
@@ -87,7 +89,7 @@ that receives a "<<" method:
|
|
87
89
|
* $ip - X-Forwarded-For request header if available, $remote_addr if not
|
88
90
|
* $pid - process ID of the current process
|
89
91
|
* $e{Thread.current} - Thread processing the request
|
90
|
-
* $e{
|
92
|
+
* $e{Fiber.current} - Fiber processing the request
|
91
93
|
* $env{variable_name} - any Rack environment variable (e.g. rack.url_scheme)
|
92
94
|
|
93
95
|
== REQUIREMENTS
|
@@ -98,28 +100,40 @@ that receives a "<<" method:
|
|
98
100
|
|
99
101
|
The latest development happens in git and is published to the following:
|
100
102
|
|
101
|
-
git clone https://
|
102
|
-
git clone
|
103
|
+
git clone https://YHBT.net/clogger.git
|
104
|
+
git clone https://repo.or.cz/clogger.git
|
103
105
|
|
104
106
|
You may also browse and download snapshot tarballs:
|
105
107
|
|
106
|
-
* https://
|
107
|
-
*
|
108
|
+
* https://YHBT.net/clogger.git
|
109
|
+
* https://repo.or.cz/w/clogger.git (gitweb)
|
108
110
|
|
109
|
-
|
110
|
-
development. Patches should always be sent inline
|
111
|
-
(git format-patch -M + git send-email) so we can reply to them inline.
|
111
|
+
We use email for coordination and development, see below:
|
112
112
|
|
113
113
|
== CONTACT
|
114
114
|
|
115
115
|
All feedback (bug reports, user/development discussion, patches, pull
|
116
|
-
requests)
|
116
|
+
requests) is done via publicly-archived email:
|
117
117
|
|
118
|
-
*
|
118
|
+
* https://YHBT.net/clogger-public/
|
119
|
+
* imaps://YHBT.net/inbox.comp.lang.ruby.clogger.0
|
120
|
+
* nntps://news.public-inbox.org/inbox.comp.lang.ruby.clogger
|
119
121
|
|
120
|
-
|
122
|
+
Tor users may also access HTTP, IMAP, and NNTP archives via .onion:
|
121
123
|
|
122
|
-
|
124
|
+
* http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/clogger-public/
|
125
|
+
* imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.clogger.0
|
126
|
+
* nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.clogger
|
127
|
+
|
128
|
+
AUTH=ANONYMOUS is supported for IMAP and IMAPS, and any
|
129
|
+
username + password will work.
|
130
|
+
|
131
|
+
No subscription or real names will ever be required to email us.
|
132
|
+
Do not send HTML email, do not top post.
|
133
|
+
|
134
|
+
* mailto:clogger-public@YHBT.net
|
135
|
+
|
136
|
+
Homepage: https://YHBT.net/clogger/
|
123
137
|
|
124
138
|
== INSTALL
|
125
139
|
|
data/clogger.gemspec
CHANGED
@@ -3,12 +3,12 @@ manifest = File.exist?('.manifest') ?
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = %q{clogger}
|
6
|
-
s.version = (ENV['VERSION'] || '2.
|
7
|
-
s.homepage = 'https://
|
6
|
+
s.version = (ENV['VERSION'] || '2.4.0').dup
|
7
|
+
s.homepage = 'https://YHBT.net/clogger/'
|
8
8
|
s.authors = ["cloggers"]
|
9
9
|
s.summary = 'configurable request logging for Rack'
|
10
10
|
s.description = File.read('README').split("\n\n")[1]
|
11
|
-
s.email = %q{clogger-public@
|
11
|
+
s.email = %q{clogger-public@YHBT.net}
|
12
12
|
s.extra_rdoc_files = IO.readlines('.document').map!(&:chomp!).keep_if do |f|
|
13
13
|
File.exist?(f)
|
14
14
|
end
|
data/ext/clogger_ext/clogger.c
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
/* quiet deprecation for _BSD_SOURCE and _SVID_SOURCE: */
|
2
|
+
#define _DEFAULT_SOURCE 1
|
3
|
+
|
1
4
|
#include <ruby.h>
|
2
5
|
#ifdef HAVE_RUBY_IO_H
|
3
6
|
# include <ruby/io.h>
|
@@ -374,12 +377,40 @@ static void append_ts(struct clogger *c, VALUE op, struct timespec *ts)
|
|
374
377
|
rb_str_buf_cat(c->log_buf, buf, nr);
|
375
378
|
}
|
376
379
|
|
380
|
+
#define NANO_PER_SEC (1000 * 1000 * 1000)
|
377
381
|
static void append_request_time_fmt(struct clogger *c, VALUE op)
|
378
382
|
{
|
379
383
|
struct timespec now;
|
384
|
+
unsigned long ipow = NUM2ULONG(rb_ary_entry(op, 3));
|
380
385
|
|
381
386
|
clock_gettime(hopefully_CLOCK_MONOTONIC, &now);
|
382
387
|
clock_diff(&now, &c->ts_start);
|
388
|
+
if (ipow) {
|
389
|
+
struct timespec prev;
|
390
|
+
unsigned long adj = 1;
|
391
|
+
/*
|
392
|
+
* n.b. timespec.tv_sec may not be time_t on some platforms,
|
393
|
+
* so we use a full timespec struct instead of time_t:
|
394
|
+
*/
|
395
|
+
prev.tv_sec = now.tv_sec;
|
396
|
+
do { adj *= 10; } while (--ipow);
|
397
|
+
now.tv_sec *= adj;
|
398
|
+
now.tv_nsec *= adj;
|
399
|
+
if (now.tv_nsec >= NANO_PER_SEC) {
|
400
|
+
int64_t add = now.tv_nsec / NANO_PER_SEC;
|
401
|
+
now.tv_sec += add;
|
402
|
+
now.tv_nsec %= NANO_PER_SEC;
|
403
|
+
}
|
404
|
+
if (now.tv_sec < prev.tv_sec) { /* overflowed */
|
405
|
+
now.tv_nsec = NANO_PER_SEC - 1;
|
406
|
+
/*
|
407
|
+
* some platforms may use unsigned .tv_sec, but
|
408
|
+
* they're not worth supporting, so keep unsigned:
|
409
|
+
*/
|
410
|
+
now.tv_sec = (time_t)(sizeof(now.tv_sec) == 4 ?
|
411
|
+
INT_MAX : LONG_MAX);
|
412
|
+
}
|
413
|
+
}
|
383
414
|
append_ts(c, op, &now);
|
384
415
|
}
|
385
416
|
|
@@ -416,10 +447,11 @@ static void append_request(struct clogger *c)
|
|
416
447
|
{
|
417
448
|
VALUE tmp;
|
418
449
|
|
419
|
-
/* REQUEST_METHOD doesn't need escaping, Rack::Lint governs it */
|
420
450
|
tmp = rb_hash_aref(c->env, g_REQUEST_METHOD);
|
421
|
-
if (!NIL_P(tmp))
|
451
|
+
if (!NIL_P(tmp)) {
|
452
|
+
tmp = byte_xs(tmp);
|
422
453
|
rb_str_buf_append(c->log_buf, tmp);
|
454
|
+
}
|
423
455
|
|
424
456
|
rb_str_buf_append(c->log_buf, g_space);
|
425
457
|
|
@@ -1073,6 +1105,7 @@ void Init_clogger_ext(void)
|
|
1073
1105
|
tmp = rb_const_get(rb_cObject, rb_intern("Rack"));
|
1074
1106
|
tmp = rb_const_get(tmp, rb_intern("Utils"));
|
1075
1107
|
cHeaderHash = rb_const_get(tmp, rb_intern("HeaderHash"));
|
1108
|
+
rb_ary_push(mark_ary, cHeaderHash);
|
1076
1109
|
|
1077
1110
|
rb_obj_freeze(mark_ary);
|
1078
1111
|
}
|
data/lib/clogger/pure.rb
CHANGED
@@ -118,8 +118,7 @@ private
|
|
118
118
|
version = env['HTTP_VERSION'] and version = " #{byte_xs(version)}"
|
119
119
|
qs = env['QUERY_STRING']
|
120
120
|
qs.empty? or qs = "?#{byte_xs(qs)}"
|
121
|
-
"#{env['REQUEST_METHOD']} "
|
122
|
-
"#{request_uri(env)}#{version}"
|
121
|
+
"#{byte_xs(env['REQUEST_METHOD'] || '')} #{request_uri(env)}#{version}"
|
123
122
|
when :request_uri
|
124
123
|
request_uri(env)
|
125
124
|
when :request_length
|
@@ -134,17 +133,10 @@ private
|
|
134
133
|
when :time_iso8601
|
135
134
|
Time.now.iso8601
|
136
135
|
when :time_local
|
137
|
-
|
138
|
-
|
139
|
-
sign = off < 0 ? '-' : '+'
|
140
|
-
sprintf("%02d/%s/%d:%02d:%02d:%02d #{sign}%02d%02d",
|
141
|
-
t.mday, Time::RFC2822_MONTH_NAME[t.mon - 1],
|
142
|
-
t.year, t.hour, t.min, t.sec, *(off.abs / 60).divmod(60))
|
136
|
+
# %b in Ruby is locale-independent, unlike strftime(3) in C
|
137
|
+
Time.now.strftime('%d/%b/%Y:%H:%M:%S %z')
|
143
138
|
when :time_utc
|
144
|
-
|
145
|
-
sprintf("%02d/%s/%d:%02d:%02d:%02d +0000",
|
146
|
-
t.mday, Time::RFC2822_MONTH_NAME[t.mon - 1],
|
147
|
-
t.year, t.hour, t.min, t.sec)
|
139
|
+
Time.now.utc.strftime('%d/%b/%Y:%H:%M:%S %z')
|
148
140
|
else
|
149
141
|
raise "EDOOFUS #{special_nr}"
|
150
142
|
end
|
@@ -166,6 +158,7 @@ private
|
|
166
158
|
when OP_TIME_UTC; Time.now.utc.strftime(op[1])
|
167
159
|
when OP_REQUEST_TIME
|
168
160
|
t = mono_now - start
|
161
|
+
t = t * (10 ** op[3])
|
169
162
|
time_format(t.to_i, (t - t.to_i) * 1000000, op[1], op[2])
|
170
163
|
when OP_TIME
|
171
164
|
t = Time.now
|
data/lib/clogger.rb
CHANGED
@@ -51,7 +51,7 @@ private
|
|
51
51
|
|
52
52
|
SCAN = /([^$]*)(\$+(?:env\{\w+(?:\.[\w\.]+)?\}|
|
53
53
|
e\{[^\}]+\}|
|
54
|
-
(?:request_)?time\{\d
|
54
|
+
(?:request_)?time\{\d+(?:,\d+)?\}|
|
55
55
|
time_(?:utc|local)\{[^\}]+\}|
|
56
56
|
\w*))?([^$]*)/x
|
57
57
|
|
@@ -92,7 +92,14 @@ private
|
|
92
92
|
when /\A\$time\{(\d+)\}\z/
|
93
93
|
rv << [ OP_TIME, *usec_conv_pair(tok, $1.to_i) ]
|
94
94
|
when /\A\$request_time\{(\d+)\}\z/
|
95
|
-
rv << [ OP_REQUEST_TIME, *usec_conv_pair(tok, $1.to_i) ]
|
95
|
+
rv << [ OP_REQUEST_TIME, *usec_conv_pair(tok, $1.to_i), 0 ]
|
96
|
+
when /\A\$request_time\{(\d+),(\d+)\}\z/
|
97
|
+
ipow = $1.to_i
|
98
|
+
prec = $2.to_i
|
99
|
+
if ipow > 9 # nanosecond precision is the highest POSIX goes
|
100
|
+
raise ArgumentError, "#{tok}: too big: #{ipow} (max=9)"
|
101
|
+
end
|
102
|
+
rv << [ OP_REQUEST_TIME, *usec_conv_pair(tok, prec), ipow ]
|
96
103
|
else
|
97
104
|
tok_sym = tok[1..-1].to_sym
|
98
105
|
if special_code = SPECIAL_VARS[tok_sym]
|
data/pkg.mk
CHANGED
data/test/test_clogger.rb
CHANGED
@@ -167,10 +167,11 @@ class TestClogger < Test::Unit::TestCase
|
|
167
167
|
ary = compile_format(
|
168
168
|
'$remote_addr - $remote_user [$time_local] ' \
|
169
169
|
'"$request" $status $body_bytes_sent "$http_referer" ' \
|
170
|
-
'"$http_user_agent" "$http_cookie" $request_time ' \
|
170
|
+
'"$http_user_agent" "$http_cookie" $request_time $request_time{6,0} ' \
|
171
171
|
'$env{rack.url_scheme}' \
|
172
172
|
"\n")
|
173
173
|
}
|
174
|
+
|
174
175
|
expect = [
|
175
176
|
[ Clogger::OP_REQUEST, "REMOTE_ADDR" ],
|
176
177
|
[ Clogger::OP_LITERAL, " - " ],
|
@@ -190,7 +191,9 @@ class TestClogger < Test::Unit::TestCase
|
|
190
191
|
[ Clogger::OP_LITERAL, "\" \"" ],
|
191
192
|
[ Clogger::OP_REQUEST, "HTTP_COOKIE" ],
|
192
193
|
[ Clogger::OP_LITERAL, "\" " ],
|
193
|
-
[ Clogger::OP_REQUEST_TIME, '%d.%03d', 1000 ],
|
194
|
+
[ Clogger::OP_REQUEST_TIME, '%d.%03d', 1000, 0],
|
195
|
+
[ Clogger::OP_LITERAL, " " ],
|
196
|
+
[ Clogger::OP_REQUEST_TIME, '%d', 1, 6],
|
194
197
|
[ Clogger::OP_LITERAL, " " ],
|
195
198
|
[ Clogger::OP_REQUEST, "rack.url_scheme" ],
|
196
199
|
[ Clogger::OP_LITERAL, "\n" ],
|
@@ -209,6 +212,22 @@ class TestClogger < Test::Unit::TestCase
|
|
209
212
|
assert_equal "-#{current}-\n", str.string
|
210
213
|
end
|
211
214
|
|
215
|
+
def test_fiber
|
216
|
+
begin
|
217
|
+
current = Fiber.current.to_s
|
218
|
+
rescue NameError => e
|
219
|
+
warn "your Ruby does not support fibers #{e}"
|
220
|
+
return
|
221
|
+
end
|
222
|
+
str = StringIO.new
|
223
|
+
app = lambda { |env| [ 302, {}, [] ] }
|
224
|
+
cl = Clogger.new(app,
|
225
|
+
:logger => str,
|
226
|
+
:format => "-$e{Fiber.current}-\n")
|
227
|
+
status, headers, body = cl.call(@req)
|
228
|
+
assert_equal "-#{current}-\n", str.string
|
229
|
+
end
|
230
|
+
|
212
231
|
def test_pid
|
213
232
|
str = StringIO.new
|
214
233
|
app = lambda { |env| [ 302, {}, [] ] }
|
@@ -721,6 +740,24 @@ class TestClogger < Test::Unit::TestCase
|
|
721
740
|
assert s[-1].to_f <= 0.110
|
722
741
|
end
|
723
742
|
|
743
|
+
def test_request_time_with_multiplier
|
744
|
+
s = []
|
745
|
+
app = lambda { |env| sleep(0.1) ; [302, [], [] ] }
|
746
|
+
cl = Clogger.new(app, :logger => s, :format => "$request_time{9,0}")
|
747
|
+
status, headers, body = cl.call(@req)
|
748
|
+
assert_nothing_raised { body.each { |x| } ; body.close }
|
749
|
+
assert s[-1].to_f >= 100000000
|
750
|
+
assert s[-1].to_f <= 300000000
|
751
|
+
end
|
752
|
+
|
753
|
+
def test_request_time_with_invalid_multiplier
|
754
|
+
s = []
|
755
|
+
app = lambda { |env| sleep(0.1) ; [302, [], [] ] }
|
756
|
+
assert_raise(ArgumentError) {
|
757
|
+
cl = Clogger.new(app, :logger => s, :format => "$request_time{10,0}")
|
758
|
+
}
|
759
|
+
end
|
760
|
+
|
724
761
|
def test_insanely_long_time_format
|
725
762
|
s = []
|
726
763
|
app = lambda { |env| [200, [], [] ] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clogger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cloggers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
description: |-
|
48
48
|
clogger is Rack middleware for logging HTTP requests. The log format
|
49
49
|
is customizable so you can specify exactly which fields to log.
|
50
|
-
email: clogger-public@
|
50
|
+
email: clogger-public@YHBT.net
|
51
51
|
executables: []
|
52
52
|
extensions:
|
53
53
|
- ext/clogger_ext/extconf.rb
|
@@ -85,7 +85,7 @@ files:
|
|
85
85
|
- setup.rb
|
86
86
|
- test/test_clogger.rb
|
87
87
|
- test/test_clogger_to_path.rb
|
88
|
-
homepage: https://
|
88
|
+
homepage: https://YHBT.net/clogger/
|
89
89
|
licenses:
|
90
90
|
- LGPL-2.1+
|
91
91
|
metadata: {}
|