mixlib-log-1.6.0/0000755000004100000410000000000012537052771013622 5ustar www-datawww-datamixlib-log-1.6.0/Rakefile0000644000004100000410000000125012537052771015265 0ustar www-datawww-datarequire 'rake' require 'rubygems/package_task' require 'rdoc/task' require 'yaml' require 'rspec/core/rake_task' require 'cucumber/rake/task' gemspec = eval(IO.read('mixlib-log.gemspec')) Gem::PackageTask.new(gemspec) do |pkg| pkg.gem_spec = gemspec end RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = 'spec/**/*_spec.rb' end task :default => :spec # For rubygems-test task :test => :spec RDoc::Task.new do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = "mixlib-log #{Mixlib::Log::VERSION}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end Cucumber::Rake::Task.new(:features) do |t| t.cucumber_opts = "--format pretty" end mixlib-log-1.6.0/.gemtest0000644000004100000410000000000012537052771015261 0ustar www-datawww-datamixlib-log-1.6.0/spec/0000755000004100000410000000000012537052771014554 5ustar www-datawww-datamixlib-log-1.6.0/spec/spec_helper.rb0000644000004100000410000000161312537052771017373 0ustar www-datawww-data# # Author:: Adam Jacob () # Author:: Christopher Brown () # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # $TESTING=true $:.push File.join(File.dirname(__FILE__), '..', 'lib') require 'rspec' require 'mixlib/log' require 'mixlib/log/formatter' class Logit extend Mixlib::Log end mixlib-log-1.6.0/spec/mixlib/0000755000004100000410000000000012537052771016040 5ustar www-datawww-datamixlib-log-1.6.0/spec/mixlib/log/0000755000004100000410000000000012537052771016621 5ustar www-datawww-datamixlib-log-1.6.0/spec/mixlib/log/formatter_spec.rb0000644000004100000410000000344412537052771022170 0ustar www-datawww-data# # Author:: Adam Jacob () # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # require 'time' require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper")) describe Mixlib::Log::Formatter do before(:each) do @formatter = Mixlib::Log::Formatter.new end it "should print raw strings with msg2str(string)" do @formatter.msg2str("nuthin new").should == "nuthin new" end it "should format exceptions properly with msg2str(e)" do e = IOError.new("legendary roots crew") @formatter.msg2str(e).should == "legendary roots crew (IOError)\n" end it "should format random objects via inspect with msg2str(Object)" do @formatter.msg2str([ "black thought", "?uestlove" ]).should == '["black thought", "?uestlove"]' end it "should return a formatted string with call" do time = Time.new Mixlib::Log::Formatter.show_time = true @formatter.call("monkey", time, "test", "mos def").should == "[#{time.iso8601}] monkey: mos def\n" end it "should allow you to turn the time on and off in the output" do Mixlib::Log::Formatter.show_time = false @formatter.call("monkey", Time.new, "test", "mos def").should == "monkey: mos def\n" end end mixlib-log-1.6.0/spec/mixlib/log_spec.rb0000644000004100000410000001042612537052771020163 0ustar www-datawww-data# # Author:: Adam Jacob () # Author:: Christopher Brown () # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # require 'tempfile' require 'stringio' require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper")) class LoggerLike attr_accessor :level attr_reader :messages def initialize @messages = "" end [:debug, :info, :warn, :error, :fatal].each do |method_name| class_eval(<<-E) def #{method_name}(message) @messages << message end E end end describe Mixlib::Log do # Since we are testing class behaviour for an instance variable # that gets set once, we need to reset it prior to each example [cb] before(:each) do Logit.reset! end it "creates a logger using an IO object" do io = StringIO.new Logit.init(io) Logit << "foo" io.string.should match(/foo/) end it "creates a logger with a file name" do Tempfile.open("chef-test-log") do |tempfile| Logit.init(tempfile.path) Logit << "bar" tempfile.rewind tempfile.read.should match(/bar/) end end it "uses the logger provided when initialized with a logger like object" do logger = LoggerLike.new Logit.init(logger) Logit.debug "qux" logger.messages.should match(/qux/) end it "should re-initialize the logger if init is called again" do first_logdev, second_logdev = StringIO.new, StringIO.new Logit.init(first_logdev) Logit.fatal "FIRST" first_logdev.string.should match(/FIRST/) Logit.init(second_logdev) Logit.fatal "SECOND" first_logdev.string.should_not match(/SECOND/) second_logdev.string.should match(/SECOND/) end it "should set the log level using the binding form, with :debug, :info, :warn, :error, or :fatal" do levels = { :debug => Logger::DEBUG, :info => Logger::INFO, :warn => Logger::WARN, :error => Logger::ERROR, :fatal => Logger::FATAL } levels.each do |symbol, constant| Logit.level = symbol Logit.logger.level.should == constant Logit.level.should == symbol end end it "passes blocks to the underlying logger object" do logdev = StringIO.new Logit.init(logdev) Logit.fatal { "the_message" } logdev.string.should match(/the_message/) end it "should set the log level using the method form, with :debug, :info, :warn, :error, or :fatal" do levels = { :debug => Logger::DEBUG, :info => Logger::INFO, :warn => Logger::WARN, :error => Logger::ERROR, :fatal => Logger::FATAL } levels.each do |symbol, constant| Logit.level(symbol) Logit.logger.level.should == constant end end it "should raise an ArgumentError if you try and set the level to something strange using the binding form" do lambda { Logit.level = :the_roots }.should raise_error(ArgumentError) end it "should raise an ArgumentError if you try and set the level to something strange using the method form" do lambda { Logit.level(:the_roots) }.should raise_error(ArgumentError) end it "should pass other method calls directly to logger" do Logit.level = :debug Logit.should be_debug lambda { Logit.debug("Gimme some sugar!") }.should_not raise_error end it "should default to STDOUT if init is called with no arguments" do logger_mock = Struct.new(:formatter, :level).new Logger.stub!(:new).and_return(logger_mock) Logger.should_receive(:new).with(STDOUT).and_return(logger_mock) Logit.init end it "should have by default a base log level of warn" do logger_mock = Struct.new(:formatter, :level).new Logger.stub!(:new).and_return(logger_mock) Logit.init Logit.level.should eql(:warn) end end mixlib-log-1.6.0/README.rdoc0000644000004100000410000000110512537052771015425 0ustar www-datawww-data== Mixlib::Log Mixlib::Log provides a mixin for enabling a class based logger object, a-la Merb, Chef, and Nanite. To use it: require 'mixlib/log' class Log extend Mixlib::Log end You can then do: Log.debug("foo") Log.info("bar") Log.warn("baz") Log.error("baz") Log.fatal("wewt") By default, Mixlib::Logger logs to STDOUT. To alter this, you should call Log.init, passing any arguments to the standard Ruby Logger. For example: Log.init("/tmp/logfile") # log to /tmp/logfile Log.init("/tmp/logfile", 7) # log to /tmp/logfile, rotate every day Enjoy! mixlib-log-1.6.0/lib/0000755000004100000410000000000012537052771014370 5ustar www-datawww-datamixlib-log-1.6.0/lib/mixlib/0000755000004100000410000000000012537052771015654 5ustar www-datawww-datamixlib-log-1.6.0/lib/mixlib/log/0000755000004100000410000000000012537052771016435 5ustar www-datawww-datamixlib-log-1.6.0/lib/mixlib/log/formatter.rb0000644000004100000410000000340712537052771020771 0ustar www-datawww-data# # Author:: Adam Jacob () # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'logger' require 'time' module Mixlib module Log class Formatter < Logger::Formatter @@show_time = true def self.show_time=(show=false) @@show_time = show end # Prints a log message as '[time] severity: message' if Chef::Log::Formatter.show_time == true. # Otherwise, doesn't print the time. def call(severity, time, progname, msg) if @@show_time sprintf("[%s] %s: %s\n", time.iso8601(), severity, msg2str(msg)) else sprintf("%s: %s\n", severity, msg2str(msg)) end end # Converts some argument to a Logger.severity() call to a string. Regular strings pass through like # normal, Exceptions get formatted as "message (class)\nbacktrace", and other random stuff gets # put through "object.inspect" def msg2str(msg) case msg when ::String msg when ::Exception "#{ msg.message } (#{ msg.class })\n" << (msg.backtrace || []).join("\n") else msg.inspect end end end end end mixlib-log-1.6.0/lib/mixlib/log/version.rb0000644000004100000410000000007312537052771020447 0ustar www-datawww-datamodule Mixlib module Log VERSION = "1.6.0" end end mixlib-log-1.6.0/lib/mixlib/log.rb0000644000004100000410000001213012537052771016757 0ustar www-datawww-data# # Author:: Adam Jacob () # Author:: Christopher Brown () # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'logger' require 'mixlib/log/version' require 'mixlib/log/formatter' module Mixlib module Log @logger, @loggers = nil LEVELS = { :debug=>Logger::DEBUG, :info=>Logger::INFO, :warn=>Logger::WARN, :error=>Logger::ERROR, :fatal=>Logger::FATAL}.freeze LEVEL_NAMES = LEVELS.invert.freeze def reset! @logger, @loggers = nil, nil end # An Array of log devices that will be logged to. Defaults to just the default # @logger log device, but you can push to this array to add more devices. def loggers @loggers ||= [logger] end ## # init always returns a configured logger # and creates a new one if it doesn't yet exist ## def logger @logger || init end # Sets the log device to +new_log_device+. Any additional loggers # that had been added to the +loggers+ array will be cleared. def logger=(new_log_device) reset! @logger=new_log_device end def use_log_devices(other) if other.respond_to?(:loggers) && other.respond_to?(:logger) @loggers = other.loggers @logger = other.logger elsif other.kind_of?(Array) @loggers = other @logger = other.first else msg = "#use_log_devices takes a Mixlib::Log object or array of log devices. " << "You gave: #{other.inspect}" raise ArgumentError, msg end end # Use Mixlib::Log.init when you want to set up the logger manually. Arguments to this method # get passed directly to Logger.new, so check out the documentation for the standard Logger class # to understand what to do here. # # If this method is called with no arguments, it will log to STDOUT at the :warn level. # # It also configures the Logger instance it creates to use the custom Mixlib::Log::Formatter class. def init(*opts) reset! @logger = logger_for(*opts) @logger.formatter = Mixlib::Log::Formatter.new() if @logger.respond_to?(:formatter=) @logger.level = Logger::WARN @logger end # Sets the level for the Logger object by symbol. Valid arguments are: # # :debug # :info # :warn # :error # :fatal # # Throws an ArgumentError if you feed it a bogus log level. def level=(new_level) level_int = LEVEL_NAMES.key?(new_level) ? new_level : LEVELS[new_level] raise ArgumentError, "Log level must be one of :debug, :info, :warn, :error, or :fatal" if level_int.nil? loggers.each {|l| l.level = level_int } end def level(new_level=nil) if new_level.nil? LEVEL_NAMES[logger.level] else self.level=(new_level) end end # Define the standard logger methods on this class programmatically. # No need to incur method_missing overhead on every log call. [:debug, :info, :warn, :error, :fatal].each do |method_name| class_eval(<<-METHOD_DEFN, __FILE__, __LINE__) def #{method_name}(msg=nil, &block) loggers.each {|l| l.#{method_name}(msg, &block) } end METHOD_DEFN end # Define the methods to interrogate the logger for the current log level. # Note that we *only* query the default logger (@logger) and not any other # loggers that may have been added, even though it is possible to configure # two (or more) loggers at different log levels. [:debug?, :info?, :warn?, :error?, :fatal?].each do |method_name| class_eval(<<-METHOD_DEFN, __FILE__, __LINE__) def #{method_name} logger.#{method_name} end METHOD_DEFN end def <<(msg) loggers.each {|l| l << msg } end def add(severity, message = nil, progname = nil, &block) loggers.each {|l| l.add(severity, message = nil, progname = nil, &block) } end alias :log :add # Passes any other method calls on directly to the underlying Logger object created with init. If # this method gets hit before a call to Mixlib::Logger.init has been made, it will call # Mixlib::Logger.init() with no arguments. def method_missing(method_symbol, *args, &block) loggers.each {|l| l.send(method_symbol, *args, &block) } end private def logger_for(*opts) if opts.empty? Logger.new(STDOUT) elsif LEVELS.keys.inject(true) {|quacks, level| quacks && opts.first.respond_to?(level)} opts.first else Logger.new(*opts) end end end end mixlib-log-1.6.0/metadata.yml0000644000004100000410000000452012537052771016126 0ustar www-datawww-data--- !ruby/object:Gem::Specification name: mixlib-log version: !ruby/object:Gem::Version version: 1.6.0 prerelease: platform: ruby authors: - Opscode, Inc. autorequire: bindir: bin cert_chain: [] date: 2013-04-02 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: rspec requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '2.10' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '2.10' - !ruby/object:Gem::Dependency name: cucumber requirement: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' description: email: info@opscode.com executables: [] extensions: [] extra_rdoc_files: - README.rdoc - LICENSE - NOTICE files: - lib/mixlib/log/formatter.rb - lib/mixlib/log/version.rb - lib/mixlib/log.rb - spec/mixlib/log/formatter_spec.rb - spec/mixlib/log_spec.rb - spec/spec_helper.rb - Rakefile - .gemtest - mixlib-log.gemspec - README.rdoc - LICENSE - NOTICE homepage: http://www.opscode.com licenses: [] post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 1.8.23 signing_key: specification_version: 3 summary: A gem that provides a simple mixin for log functionality test_files: [] mixlib-log-1.6.0/NOTICE0000644000004100000410000000166612537052771014537 0ustar www-datawww-dataMixin::Log NOTICE ================= Developed at Opscode (http://www.opscode.com). * Copyright 2009, Opscode, Inc. Mixin::Log incorporates code from Chef. The Chef notice file follows: Chef NOTICE =========== Developed at Opscode (http://www.opscode.com). Contributors and Copyright holders: * Copyright 2008, Adam Jacob * Copyright 2008, Arjuna Christensen * Copyright 2008, Bryan McLellan * Copyright 2008, Ezra Zygmuntowicz * Copyright 2009, Sean Cribbs * Copyright 2009, Christopher Brown * Copyright 2009, Thom May Chef incorporates code modified from Open4 (http://www.codeforpeople.com/lib/ruby/open4/), which was written by Ara T. Howard. Chef incorporates code modified from Merb (http://www.merbivore.com), which is Copyright (c) 2008 Engine Yard. mixlib-log-1.6.0/LICENSE0000644000004100000410000002514212537052771014633 0ustar www-datawww-data Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. mixlib-log-1.6.0/mixlib-log.gemspec0000644000004100000410000000131412537052771017231 0ustar www-datawww-data$:.unshift File.expand_path('../lib', __FILE__) require 'mixlib/log/version' Gem::Specification.new do |gem| gem.name = "mixlib-log" gem.version = Mixlib::Log::VERSION gem.platform = Gem::Platform::RUBY gem.summary = "A gem that provides a simple mixin for log functionality" gem.email = "info@opscode.com" gem.homepage = "http://www.opscode.com" gem.authors = ["Opscode, Inc."] gem.has_rdoc = true gem.extra_rdoc_files = ["README.rdoc", "LICENSE", 'NOTICE'] gem.files = Dir['lib/**/*'] + Dir['spec/**/*'] + ["Rakefile", ".gemtest", "mixlib-log.gemspec"] gem.add_development_dependency 'rake' gem.add_development_dependency 'rspec', '~> 2.10' gem.add_development_dependency 'cucumber' end