scribe 0.1 → 0.1.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.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,2 +1,4 @@
1
1
 
2
+ v0.1.1. Legacy accessors for log levels.
3
+
2
4
  v0.1. First release.
data/lib/scribe/scribe.rb CHANGED
@@ -1,5 +1,7 @@
1
1
 
2
2
  class Scribe
3
+ # Created a new client instance. Accepts an optional host, port, and default
4
+ # category.
3
5
  def initialize(host = "127.0.0.1", port = 1463, category = "Ruby")
4
6
  @host = host
5
7
  @port = port
@@ -13,6 +15,7 @@ class Scribe
13
15
  transport)
14
16
  end
15
17
 
18
+ # Log a message. Accepts a string and an optional category.
16
19
  def log(message, category = @category)
17
20
  raise ArgumentError, "Message must be a string" unless message.is_a?(String)
18
21
  raise ArgumentError, "Category must be a string" unless category.is_a?(String)
@@ -21,6 +24,7 @@ class Scribe
21
24
  @batch ? @batch << entry : @client.Log(Array(entry))
22
25
  end
23
26
 
27
+ # Batch several calls to Scribe#log together. Yields to a block.
24
28
  def batch
25
29
  @batch = []
26
30
  yield
@@ -28,4 +32,10 @@ class Scribe
28
32
  ensure
29
33
  @batch = nil
30
34
  end
35
+
36
+ alias :debug :log
37
+ alias :error :log
38
+ alias :fatal :log
39
+ alias :info :log
40
+ alias :warn :log
31
41
  end
data/scribe.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{scribe}
5
- s.version = "0.1"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0.8") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scribe
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver
metadata.gz.sig CHANGED
Binary file