Sha256: d32a6a4107224e98b78fe0ece5a7eb2376b3c1e0c758ea0fa07894dce108723b

Contents?: true

Size: 428 Bytes

Versions: 1

Compression:

Stored size: 428 Bytes

Contents

module Adalog
  class SimpleLoggingAdapter

    attr_reader :service_name, :repo

    def initialize(service_name, repo)
      @service_name = service_name
      @repo         = repo
    end

    ##
    # TODO: Record something w.r.t. whether or not a block is given?
    def method_missing(msg, *args, &block)
      repo.insert(
        title:    service_name,
        message:  msg,
        details:  args)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adalog-0.4.0 lib/adalog/simple_logging_adapter.rb