Sha256: 146589c4c33475b090bafe19ece63db0e8a1e8907d6ab41cf1522415f13f167d

Contents?: true

Size: 1.39 KB

Versions: 28

Compression:

Stored size: 1.39 KB

Contents

# Copyright (C) 2013  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

module ChupaText
  # Adds shortcut methods for easy to log.
  module Loggable
    private
    def logger
      ChupaText.logger
    end

    def debug(*arguments, &block)
      logger.debug(*arguments, &block)
    end

    def info(*arguments, &block)
      logger.info(*arguments, &block)
    end

    def warn(*arguments, &block)
      logger.warn(*arguments, &block)
    end

    def error(*arguments, &block)
      logger.error(*arguments, &block)
    end

    def fatal(*arguments, &block)
      logger.fatal(*arguments, &block)
    end

    def unknown(*arguments, &block)
      logger.unknown(*arguments, &block)
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
chupa-text-1.2.9 lib/chupa-text/loggable.rb
chupa-text-1.2.8 lib/chupa-text/loggable.rb
chupa-text-1.2.7 lib/chupa-text/loggable.rb
chupa-text-1.2.6 lib/chupa-text/loggable.rb
chupa-text-1.2.5 lib/chupa-text/loggable.rb
chupa-text-1.2.4 lib/chupa-text/loggable.rb
chupa-text-1.2.3 lib/chupa-text/loggable.rb
chupa-text-1.2.2 lib/chupa-text/loggable.rb
chupa-text-1.2.1 lib/chupa-text/loggable.rb
chupa-text-1.2.0 lib/chupa-text/loggable.rb
chupa-text-1.1.9 lib/chupa-text/loggable.rb
chupa-text-1.1.8 lib/chupa-text/loggable.rb
chupa-text-1.1.7 lib/chupa-text/loggable.rb
chupa-text-1.1.6 lib/chupa-text/loggable.rb
chupa-text-1.1.5 lib/chupa-text/loggable.rb
chupa-text-1.1.4 lib/chupa-text/loggable.rb
chupa-text-1.1.3 lib/chupa-text/loggable.rb
chupa-text-1.1.2 lib/chupa-text/loggable.rb
chupa-text-1.1.1 lib/chupa-text/loggable.rb
chupa-text-1.1.0 lib/chupa-text/loggable.rb