about summary refs log tree commit homepage
AgeCommit message (Collapse)AuthorFilesLines
2017-05-21SQUASH/WIP - use rb_funcallv to handle second respond_to arg respond_to-privEric Wong1-6/+9
While we're at it, avoid mixing declarations and code in case there's still compiler compatibility problems. (We will add a check for -Wdeclaration-after-statement support in a separate commit)
2017-05-21Update respond_to? calls for second argument.Pat Allan2-4/+8
Rack (since v2) has started explicitly listing the second (optional) argument for respond_to?, which matches the underlying Ruby spec. This patch fixes the calls in both C and Ruby approaches. However, rb_respond_to only accepts a single argument - differing from the Ruby side of things - so perhaps this patch isn't quite perfect (and my C skills are very limited, so the whole thing could use a review).
2017-02-15ext: reduce frozen string marking overheadEric Wong1-1/+7
Using rb_global_variable excessively can be expensive since it uses a singly-linked list to track addresses. Since these strings are all frozen and constant, put them into an array instead and only mark the array as a global to improve locality. Ruby 1.9+ has rb_gc_register_mark_object but it is not part of the documented, public API, so we're not using it, yet.
2017-01-17clogger.c: comment to explain the lack of GC guardEric Wong1-0/+1
If I (the person who wrote this) spent a minute figuring out why it wasn't needed, somebody else might, too. Save someone else a minute.
2016-07-28clogger 2.1.0 - rack 2.x compatibility and more! v2.1.0Eric Wong1-1/+1
5 changes since 2.0.2: test_clogger: add test for REMOTE_USER ext: avoid clobbering existing system functions pure: remove Rack::Utils.bytesize dependency loosen rack dependency to allow rack 2.x doc use HTTPS for URLs and move homepage Note the new homepage: homepage: https://bogomips.org/clogger/ code: git clone https://bogomips.org/clogger.git mail archives: https://bogomips.org/clogger-public/ email us and our archives: clogger-public@bogomips.org Coming soon: - hidden service mirrors for the homepage + git host - POP3 mailing list subscriptions!
2016-07-28doc use HTTPS for URLs and move homepageEric Wong5-14/+19
Thanks to Let's Encrypt, the bogomips.org now supports HTTPS so our homepage can be moved to: https://bogomips.org/clogger/ While clogger.bogomips.org is part of the TLS certificate, it is needless subjectAltName bloat that should not have been created. This will also make it easier to have multiple homepages in the future as a Tor hidden service.
2016-07-28loosen rack dependency to allow rack 2.xEric Wong1-2/+1
With the removal of Rack::Utils.bytesize, we are compatible with rack 2.x
2016-07-28pure: remove Rack::Utils.bytesize dependencyEric Wong1-1/+1
This method is gone from rack 2.0 and not even necessary in Ruby 1.8.7. Yes, this breaks compatibility with Ruby 1.8.6 :P
2016-07-28ext: avoid clobbering existing system functionsEric Wong2-4/+7
These defines may cause incompatibilities if Ruby or other system headers decide to clobber these. It's also confusing to override existing, well-known-and-standardized functions.
2016-01-19test_clogger: add test for REMOTE_USEREric Wong1-0/+2
This wasn't tested before, and we ought to ensure it works since it's rarely-used.
2015-02-27clogger 2.0.2 - bugfixes for pure Ruby users v2.0.2Eric Wong1-1/+1
This release fixes a bug discovered in the rarely-used pure Ruby version in multithreaded Rack servers. Some folks reported privately that they forgot to upgrade from clogger 1.0.1 when when upgrading from MRI 1.9.3 to 2.1, so they were inadvertently using the pure Ruby version instead of the less-buggy C extension. This also adds support for using the monotonic clock under Ruby 2.1+ for request timing, matching what the C extension used all along. Users of the C extension are unaffected by bugs this release fixes and do not need to upgrade. * pure: fix reentrancy of request_time * pure: use monotonic clock if possible
2015-02-27pure: use monotonic clock if possibleEric Wong1-2/+12
Ruby 2.1.0 and later exposes Process.clock_gettime, resulting in less garbage and access to the monotonic clock if it is available. Try to use it to achieve feature parity with the C extension (which has always used the monotonic clock if possible).
2015-02-27pure: fix reentrancy of request_timeEric Wong1-8/+9
For users unable to compile the C extension, multithreaded usage of clogger could return invalid request time measurements. This does not affect users of the C extension.
2015-01-13clogger 2.0.1 - doc updates and new mailing list v2.0.1Eric Wong1-1/+1
Most notably, there's a new mailing list at clogger-public@bogomips.org You may (optionally) subscribe to the new mailing list at: clogger-public+subscribe@bogomips.org If you're on librelist, you'll need to subscribe manually since librelist subscribers cannot be imported. Of course, you do not have to be subscribed to post, either (please Cc: everyone as folks may not be subscribed). shortlog: README: document $env support for reading Rack env switch docs + website to olddoc ext: get rid of noisy and unnecessary cast new mailing list at clogger-public@bogomips.org gemspec: use SPDX license abbreviation remove Rubyforge reference in Rakefile
2015-01-13remove Rubyforge reference in RakefileEric Wong1-32/+0
Rubyforge is dead
2015-01-13gemspec: use SPDX license abbreviationEric Wong1-1/+1
ref: http://spdx.org/licenses/
2015-01-13new mailing list at clogger-public@bogomips.orgEric Wong5-4/+12
You may (optionally) subscribe to the new mailing list at: clogger-public+subscribe@bogomips.org You'll need to subscribe manually since librelist subscribers cannot be imported. Of course, you do not have to be subscribed to post, either (please Cc: everyone as folks may not be subscribed). If your ISP prevents you from using port 25, port 587 (submission) is open on bogomips.org. You may use Tor if you do not wish to expose your IP when using port 587. Any HTML mail will be flagged as spam, so please do not send it and waste storage and bandwidth on it. Basic, old-fashioned mailing list conventions apply: no top-posting, trim replies, attribute your quotes, short signatures, etc. This existing list will operate in public-inbox "hijack mode": the new address is subscribed to the old librelist, so any messages sent to the librelist are automatically archived to the new public-inbox. Of course, not much happens here, anyways, so nobody notices :) Background: Over the years, I've come to disagree with the subscription-required posting policy of librelist. Combined with disabling of rsync archives, one of my main reasons for choosing librelist back in the day are gone. Lately, I've also been working on public-inbox, http://public-inbox.org/ an "archives-first" approach to mailing lists using git. ssoma (git) archives are available at: git://bogomips.org/clogger-public/ The ssoma format is described at http://ssoma.public-inbox.org/ HTML archives are going to http://bogomips.org/clogger-public/ All archives imported from gmane, and posts to this librelist also go there.
2015-01-13ext: get rid of noisy and unnecessary castEric Wong1-4/+3
2015-01-13switch docs + website to olddocEric Wong6-64/+28
wrongdoc was difficult to maintain because of the tidy-ffi dependency and the HTML5 changes in Darkfish could not be handled well by Tidy. olddoc is superior as it generates leaner HTML which loads faster, requires less scrolling and less processing power to render. Aesthetic comparisons are subjective of course but completely unimportant compared to speed and accessibility. The presence of images and CSS on the old (Darkfish-based) site probably set unreasonable expectations as to my ability and willingness to view such things. No more, the new website is entirely simple HTML which renders well with even the wimpiest browser.
2014-08-14README: document $env support for reading Rack envEric Wong1-0/+1
This is more portable across different servers than Thread.current in case of non-blocking servers which may be serving multiple clients at once. This is also faster than relying on $e{...} since $e{...} uses eval and that is slow.
2014-05-12clogger 2.0.0 - updated website URL, cleanups v2.0.0Eric Wong1-1/+1
This updates the documentation to point to the new homepage at http://clogger.bogomips.org/ There is one API change which removes :to_io support, as this was never a valid Rack extension. This also fixes a minor incompatibility which prevented the GVL from being released on ruby-trunk (2.2.0dev) during disk operations. The mailing list continues to be hosted at librelist, but that will probably soon change to a public-inbox + mailing list. There are also minor code cleanups. This also relaxes license to LGPLv2.1 or later.
2014-05-12relax license to allow LGPLv2.1 or laterEric Wong3-15/+10
In case I'm hit by a bus, the lesser evil is to allow the FSF to update our license than to be stuck as LGPLv3-only in the future. Some documentation/gemspec formatting updates while I'm at it.
2014-05-12test_clogger: workaround test failure on 32-bitEric Wong1-4/+3
StringIO isn't a very realistic use case, and our changing the length of a shared string causes errors on 32-bit.
2014-05-12remove :to_io supportEric Wong4-112/+11
:to_io never was a Rack extension, and ends up breaking the case where an SSL socket is proxied. The role of :to_io in IO-like objects is to aid IO.select and like methods.
2014-05-12clogger 1.4.0 - updated website URL, cleanups v1.4.0Eric Wong1-1/+1
This updates the documentation to point to the new homepage at http://clogger.bogomips.org/ This also fixes a minor incompatibility which prevented the GVL from being released on ruby-trunk (2.2.0dev) during disk operations. The mailing list continues to be hosted at librelist, but that will probably soon change to a public-inbox + mailing list. There are also minor code cleanups.
2014-05-12update docs for rubyforge deathEric Wong2-11/+7
Rubyforge is going away on May 15, 2014.
2014-05-06Add script for redirecting to clogger.bogomips.orgEric Wong1-0/+32
Rubyforge about to be dead.
2014-02-15use rb_thread_call_without_gvl for Ruby 2+Eric Wong2-8/+27
rb_thread_blocking_region is deprecated and will be removed
2014-02-15remove each_id, it was never usedEric Wong2-3/+1
2014-02-15prevent potential premature GC in byte_xsEric Wong1-6/+3
If we convert an object to string, there is a potential the compiler may optimize away the converted string if escaping is needed. Prevent that with RB_GC_GUARD.
2014-02-15use RB_GC_GUARD instead of volatileEric Wong1-3/+4
RB_GC_GUARD is more explicit in intent.
2014-02-15remove unused RARRAY_PTR macroEric Wong1-3/+0
We do not need it anymore
2014-02-15blocking_helpers: remove fstat wrapperEric Wong1-17/+0
The fstat syscall should never take long, even on sockets and slow FSes.
2013-09-30GNUmakefile: kill raa_update invocationEric Wong1-1/+0
RAA is still dead.
2013-09-26Rakefile: kill task to update RAAEric Wong1-38/+0
RAA is dead
2013-09-26clogger 1.3.0 - avoid RARRAY_PTR usage v1.3.0Eric Wong1-1/+1
This release only affects users of the C extension. Users of the pure Ruby code are not affected. * avoid RARRAY_PTR usage for RGenGC in Ruby 2.1.0 I have not benchmarked this, but this is unlikely to be a bottleneck at all in older Rubies. It results in a smaller binary, too, which will help with icache bloat. This should also improve performance under Rubinius, too.
2013-09-26ext: avoid RARRAY_PTR usage for RGenGC in Ruby 2.1.0Eric Wong1-34/+38
I have not benchmarked this, but this is unlikely to be a bottleneck at all in older Rubies. It results in a smaller binary, too, which will help with icache bloat. This should also improve performance under Rubinius, too.
2013-09-26README: indicate we support all versions of C RubyEric Wong1-3/+3
Because we do, and this is still what I end up using all of the time (startup performance, and I understand C, not C++)
2012-11-06clogger 1.2.0 - small bug and compatibility fixes v1.2.0Eric Wong1-1/+1
This release enables the optional C extension on MRI Ruby 2.0.0 (and any other platform that builds C extensions). For rare setups which do not specify a :logger or :path parameter for Clogger#initialize, we are now Rack::Lint compliant and call #write on env["rack.errors"] instead of "<<"
2012-11-06ext: enable C extension under Ruby 2.0.0Eric Wong2-6/+1
Ruby 2.0.0preview1 is out, and we happen to be compatible (with some harmless linker/build warnings)
2012-11-06test_clogger: fix Ruby 1.8 test compatibilityEric Wong1-1/+1
1.8 did not support my preferred way of writing hashes with symbol keys.
2012-11-02avoid calling "<<" on env["rack.errors"]Eric Wong3-3/+33
Rack::Lint::ErrorWrapper forbids the "<<" method. This fallback only comes into play when no log destination (via :logger or :path) is specified and is rarely an issue in real setups.
2012-06-08README: update for Ruby 1.9.3 support statusEric Wong1-1/+1
It never /not/ worked under 1.9.3, but we should keep the website up-to-date.
2012-06-08test case to simulate Rack::BodyProxy usage patternEric Wong1-0/+20
The use of Rack::BodyProxy#method_missing causes failures under mainline Ruby 1.9.2 and 1.9.1, but not 1.9.3. This test case exists to document this (now-fixed) bug for users stuck on older Rubies. On a side note, our usage of rb_iterate() should be rewritten to use rb_block_call() as rb_iterate() is deprecated in 1.9. A Ruby 1.9.2-p290 user privately reported this issue.
2012-05-08README: updated to use concise format syntaxEric Wong1-2/+2
It's easier-to-read with the concise syntax.
2011-12-06pkg.mk updateEric Wong1-1/+5
2011-12-05clogger 1.1.0 - more escaping! v1.1.0Eric Wong1-1/+1
This release fixes potential vulnerabilities when escape sequences are viewed in certain terminals. The 0x7F-0xFF byte range is escaped to match behavior of nginx 1.0.9+, as some character sets may have escape characters in that range. $cookie_* values are now escaped to be consistent with the behavior of the $http_cookie value. All users of $cookie_* in their log format must upgrade (of course there may be no Clogger users other than myself, and I don't use $cookie_*)
2011-12-05escape individual cookie values from $cookie_*Eric Wong3-5/+4
These values are untrusted, so if any client sends them to us we must escape them.
2011-12-05escape bytes in the 0x7F-0xFF range, tooEric Wong3-2/+13
This matches the behavior of nginx 1.0.9
2011-07-22use librelist.org for mailing list addressEric Wong2-2/+2
It's clearer that we have zero commercial intent when using a non-profit .org domain for the mailing list.