logging-couchdb 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +6 -1
- data/Rakefile +1 -1
- data/lib/logging/couch_db_layout.rb +14 -0
- metadata +1 -1
    
        data/History.txt
    CHANGED
    
    
    
        data/Rakefile
    CHANGED
    
    | @@ -23,7 +23,7 @@ PROJ.name = 'logging-couchdb' | |
| 23 23 | 
             
            PROJ.authors = 'Tim Pease'
         | 
| 24 24 | 
             
            PROJ.email = 'tim.pease@gmail.com'
         | 
| 25 25 | 
             
            PROJ.url = 'http://logging.rubyforge.org/logging-couchdb'
         | 
| 26 | 
            -
            PROJ.version = '1.0. | 
| 26 | 
            +
            PROJ.version = '1.0.1'
         | 
| 27 27 | 
             
            PROJ.rubyforge.name = 'logging'
         | 
| 28 28 | 
             
            PROJ.exclude << 'logging-couchdb.gemspec'
         | 
| 29 29 | 
             
            PROJ.readme_file = 'README.rdoc'
         | 
| @@ -92,6 +92,20 @@ module Logging::Layouts | |
| 92 92 | 
             
                  utc.strftime(TIME_FMT) % utc.usec
         | 
| 93 93 | 
             
                end
         | 
| 94 94 |  | 
| 95 | 
            +
                # The JRuby platform does not have microsecond resolution, so we use a
         | 
| 96 | 
            +
                # counter to discriminate between timestamps of the same value.
         | 
| 97 | 
            +
                if RUBY_PLATFORM == 'java'
         | 
| 98 | 
            +
                  @@discriminator = 0
         | 
| 99 | 
            +
                  class << self
         | 
| 100 | 
            +
                    undef :timestamp
         | 
| 101 | 
            +
                    def timestamp( time = nil )
         | 
| 102 | 
            +
                      @@discriminator = (@@discriminator + 1) % 1_000_000
         | 
| 103 | 
            +
                      utc = (time || Time.now).utc
         | 
| 104 | 
            +
                      utc.strftime(TIME_FMT) % @@discriminator
         | 
| 105 | 
            +
                    end
         | 
| 106 | 
            +
                  end
         | 
| 107 | 
            +
                end
         | 
| 108 | 
            +
             | 
| 95 109 | 
             
                # call-seq:
         | 
| 96 110 | 
             
                #    CouchDB.new( opts )
         | 
| 97 111 | 
             
                #
         |