about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-02-13clogger 0.3.2 v0.3.2
This release fixes a memory leak in the optional C extension due to misuse of the Ruby C API. Users of the pure Ruby version are unaffected. We also misreleased 0.3.1 with this fix, but without bumping the Clogger::VERSION constant.
2010-02-13ext: fix memory leak when reentrant/multithreaded v0.3.1
The optional C extension leaked memory due to improper use of the Ruby API, causing duplicated objects to never be garbage collected. I misread the Data_Make_Struct/Data_Wrap_Struct documentation and ended up passing NULL as the "free" argument instead of -1, causing the memory to never be freed. From README.EXT in the MRI source which I misread: > The free argument is the function to free the pointer > allocation. If this is -1, the pointer will be just freed. > The functions mark and free will be called from garbage > collector.
2010-02-09clogger 0.3.0 v0.3.0
You may now force the :reentrant flag to +true+ or +false+ in your Rack configuration file: use Clogger, :format => Clogger::Format::Combined, :logger => ::File.open("/path/to/log", "ab"), :reentrant => true This is to be compatible with Rack servers that do not use use events or Fibers for concurrency instead of threads. By default, reentrancy is enabled if env["rack.multithread"] is true, but "rack.multithread" cannot indicative of a reentrancy requirement in a web server.
2010-02-08README: update examples for :reentrant
2010-02-08Allow :reentrant flag to be forced true/false
Clogger may set this value independently of "rack.multithread" since Actor/Fiber-based servers may have multiple instances of Clogger wrapping different response bodies and yet be incompatible with "rack.multithread"
2010-01-06Fix minor build system bugs
2010-01-06clogger 0.2.0 v0.2.0
The optional C extension no longer tries to preserve the original response array as it could become subtly broken by people using non-frozen but constant responses. For the pure Ruby version, there is a 1.9-encoding bugfix for response size calculation.
2010-01-06pure: use Rack::Utils.bytesize instead of String#size
hacking the C extension with RSTRING_LEN() is so much easier :P
2010-01-06pure: avoid unnecessary method dispatches
instance variable lookups are expensive as-is
2010-01-06GNUmakefile: avoid deleting when uploading docs
2010-01-06Rakefile: raa_update task
2010-01-06README: use ::File in usage examples
A bare "File" constant may conflict with Rack::File when run inside Rack::Builder
2010-01-06ext: unpack response arrays unconditionally
It's too crazy to have to special case for frozen response constants. 3-element arrays are cheap under Ruby 1.9 anyways.
2010-01-06GNUmakefile: NEWS depends on .manifest
2010-01-06GNUmakefile: modernize for Gemcutter
Also uppercase rake/ruby variables
2009-10-06clogger 0.1.0 v0.1.0
This release should help ensure compatibility with a to-be-released version of Rack::Lint that allows subclasses of the core String and Hash objects for users of the optional C extension. Eric Wong (6): ext: convert non-Hashes #to_hash if possible ext: ensure all objects we byte_xs are Strings tests for subclassing gemspec: disable the license= field for older RubyGems GNUmakefile: fix grammar FAIL in comment cleanup packaging and website/rdoc
2009-10-06cleanup packaging and website/rdoc
2009-10-06GNUmakefile: fix grammar FAIL in comment
2009-10-06gemspec: disable the license= field for older RubyGems
2009-10-06tests for subclassing
Rack::Lint will be relaxed in the next version to allow subclasses of String and Hash objects, so ensure we're good to go when the next version of Rack hits.
2009-10-06ext: ensure all objects we byte_xs are Strings
Rack will be relaxing the spec to allow subclasses of String objects. Just in case they're not compatible, we'll convert them to strings.
2009-10-06ext: convert non-Hashes #to_hash if possible
This is to remain compatible with Rack if it relaxes Rack::Lint to allow subclasses.
2009-09-09clogger 0.0.7 v0.0.7
We now properly handle bodies that do not respond to the :close method. Additionally there small documentation/formatting fixes.
2009-09-09handle bodies that do not respond to :close
Since the wrapped Clogger object always responds to close, we cannot blindly delegate the close method to the body without ensuring it can be closed. So ensure that it can be closed before attempting to close it, all return values and errors are trapped and returned. Reported-by: IƱaki Baz Castillo
2009-09-07README: fix some grammar peculiarities
2009-09-07README: document $status
Hopefully it was obvious before, if not it is now.
2009-09-07Rakefile: preformatted text for history rdoc
escaping issues are too painful to deal with
2009-09-07Rakefile: Fix history with multi-paragraph tag messages
2009-09-07gemspec: license is LGPLv3
Odd, RubyGems doesn't warn about a lack of it and I didn't notice this field until now...
2009-09-07GNUmakefile: cleanup release notes generation
2009-09-07clogger 0.0.6 v0.0.6
"clogger_ext" is no longer a separate gem, but merged into the "clogger" gem itself. The installation should automatically detect compatible versions of Ruby and only build the C extension for MRI 1.8/1.9. Rack::Utils::HeaderHash is now used for $sent_http_* variable lookups instead of a hand-rolled solution. HeaderHash objects should be reusable in Rack soon to avoid the penalty of recreating them repeatedly in middlewares and hopefully more-widely used as a result. Underlying logger objects are sync=true for safety reasons. This has always been the case for the C extension version when writing to regular files. Other small changes include more CGI variables and the :ORS (output record separator) option added (default: "\n").
2009-09-07ext: fix compiler warnings in the cpp "comment"
2009-09-07Don't bother creating HeaderHash unless we need it
It's expensive to create if not needed, and no current released version of Rack has my proposed optimizations for it yet...
2009-09-07README: note that it's multi-instance-safe
2009-09-07README: fix links
2009-09-07enable MRI C extension by default
It was too much confusion to have multiple gems in the mix and I mainly use the C extension anyways. If we're not on a compatible version of Ruby, the extension will just be disabled by generating a dummy no-op Makefile to work around it.
2009-09-07Switch to hand-rolled packaging/distro scripts
Several bikeshed reasons brought me to this point: * I like the README.html layout more than any default index.html even if it's using README content. Having links on the side helps navigation IMHO. * publish_docs preserves timestamps to improve cache hit rate * git is used to maintain the manifest at packaging/release-time so my changesets have less noise in them * git is used to generate history files (from tag messages), this is a more DRY approach to me. * I don't like the ".txt" suffix being translated to "_txt.html" in URLs. I don't like the ".txt" suffix in general. * I don't like Manifest.txt showing up in my RDoc
2009-09-07ext: hack to prevent rdoc from finding Rack* namespace
TODO: find a better way to do this...
2009-09-04ext: only duplicate frozen response arrays
Otherwise modify the response array in place since most frameworks give you a modifiable array for you to play with anyways.
2009-09-04use Rack::Utils::HeaderHash for $sent_http_* lookups
No point in having extra code to do case-insensitive lookups, especially since the HeaderHash implementation is already in wide use and will only get faster as time goes by.
2009-09-04ext: store each response element explicitly
Avoid calling RARRAY_PTR all over the place and make the code easier to read/audit as a result.
2009-09-04ext: more consistent function naming
s/init_bad_response/init_bad_app_response/ The new name matches the variable it initializes more closely.
2009-09-03add support for several more CGI variables
$auth_type, $gateway_interface, $server_software, $path_translated are all supported now.
2009-09-03add output record separator option (:ORS)
This allows overriding the default of "\n". Behavior remains similar to IO#puts, the :ORS (output record separator) is appended iff the format doesn't already end with that string.
2009-09-03CLOGGER_PURE forces the pure version to be loaded
This is useful for testing the pure Ruby version in case clogger_ext is already installed on your system.
2009-09-03Ensure underlying logger objects are sync=true
Userspace buffering defaults are dangerous as the Ruby default IO objects do not do line-aware buffering. This makes the README examples with File.open much safer to use out-of-the-box for users of the pure-Ruby version. For users on the MRI C extension logging to regular files, this should not have any effect as we've optimized those to do unbuffered write(2) syscalls anyways.
2009-09-02clogger 0.0.5 v0.0.5
2009-09-02README: minor updates and clarifications
* link to Clogger::Format when talking about predefined formats * use upper-case for escape chars since that's what we use * clarify $request_time{PRECISION} range
2009-09-02alias $http_content_{length,type} to $content_{length,type}
Since Rack doesn't allow the HTTP_CONTENT_{LENGTH,TYPE} headers, alias attempts to use those to the non-"HTTP_"-prefixed equivalents to avoid confusion on the user side (nginx also does this).
2009-09-02expose the $content_length/$content_type variables
Since the HTTP_CONTENT_LENGTH and HTTP_CONTENT_TYPE variables are not allowed by Rack, we need to allow access to the CGI variables instead.