scribe 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -1
- data/Manifest +1 -0
- data/conf/scribe.conf +1 -1
- data/lib/scribe/debug.rb +0 -0
- data/lib/scribe/scribe.rb +6 -4
- data/scribe.gemspec +4 -4
- data.tar.gz.sig +0 -0
- metadata +4 -2
- metadata.gz.sig +0 -0
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
data/conf/scribe.conf
CHANGED
data/lib/scribe/debug.rb
ADDED
File without changes
|
data/lib/scribe/scribe.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
|
2
2
|
class Scribe
|
3
|
-
# Created a new client instance. Accepts an optional host, port,
|
4
|
-
# category.
|
5
|
-
def initialize(host = "127.0.0.1", port = 1463, category = "Ruby")
|
3
|
+
# Created a new client instance. Accepts an optional host, port, default
|
4
|
+
# category, and flag to control whether newlines are added to each line.
|
5
|
+
def initialize(host = "127.0.0.1", port = 1463, category = "Ruby", add_newlines = true)
|
6
6
|
@host = host
|
7
7
|
@port = port
|
8
8
|
@category = category
|
9
|
+
@add_newlines = add_newlines
|
9
10
|
|
10
11
|
transport = Thrift::FramedTransport.new(Thrift::Socket.new(@host, @port))
|
11
12
|
transport.open
|
@@ -19,7 +20,8 @@ class Scribe
|
|
19
20
|
def log(message, category = @category)
|
20
21
|
raise ArgumentError, "Message must be a string" unless message.is_a?(String)
|
21
22
|
raise ArgumentError, "Category must be a string" unless category.is_a?(String)
|
22
|
-
|
23
|
+
|
24
|
+
message << "\n" if @add_newlines
|
23
25
|
entry = ScribeThrift::LogEntry.new(:message => message, :category => category)
|
24
26
|
@batch ? @batch << entry : @client.Log(Array(entry))
|
25
27
|
end
|
data/scribe.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
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.2"
|
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"]
|
9
9
|
s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
|
10
|
-
s.date = %q{2009-
|
10
|
+
s.date = %q{2009-10-01}
|
11
11
|
s.description = %q{A Ruby client for the Scribe distributed log server.}
|
12
12
|
s.email = %q{}
|
13
|
-
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/scribe.rb", "lib/scribe/safe_client.rb", "lib/scribe/scribe.rb"]
|
14
|
-
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README", "Rakefile", "conf/scribe.conf", "lib/scribe.rb", "lib/scribe/safe_client.rb", "lib/scribe/scribe.rb", "test/scribe_test.rb", "test/test_helper.rb", "vendor/gen-rb/facebook_service.rb", "vendor/gen-rb/fb303_constants.rb", "vendor/gen-rb/fb303_types.rb", "vendor/gen-rb/scribe.rb", "vendor/gen-rb/scribe_constants.rb", "vendor/gen-rb/scribe_types.rb", "scribe.gemspec"]
|
13
|
+
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/scribe.rb", "lib/scribe/debug.rb", "lib/scribe/safe_client.rb", "lib/scribe/scribe.rb"]
|
14
|
+
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README", "Rakefile", "conf/scribe.conf", "lib/scribe.rb", "lib/scribe/debug.rb", "lib/scribe/safe_client.rb", "lib/scribe/scribe.rb", "test/scribe_test.rb", "test/test_helper.rb", "vendor/gen-rb/facebook_service.rb", "vendor/gen-rb/fb303_constants.rb", "vendor/gen-rb/fb303_types.rb", "vendor/gen-rb/scribe.rb", "vendor/gen-rb/scribe_constants.rb", "vendor/gen-rb/scribe_types.rb", "scribe.gemspec"]
|
15
15
|
s.homepage = %q{http://blog.evanweaver.com/files/doc/fauna/scribe/}
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Scribe", "--main", "README"]
|
17
17
|
s.require_paths = ["lib"]
|
data.tar.gz.sig
CHANGED
Binary file
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Weaver
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
yZ0=
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date: 2009-
|
33
|
+
date: 2009-10-01 00:00:00 -07:00
|
34
34
|
default_executable:
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
@@ -64,6 +64,7 @@ extra_rdoc_files:
|
|
64
64
|
- LICENSE
|
65
65
|
- README
|
66
66
|
- lib/scribe.rb
|
67
|
+
- lib/scribe/debug.rb
|
67
68
|
- lib/scribe/safe_client.rb
|
68
69
|
- lib/scribe/scribe.rb
|
69
70
|
files:
|
@@ -74,6 +75,7 @@ files:
|
|
74
75
|
- Rakefile
|
75
76
|
- conf/scribe.conf
|
76
77
|
- lib/scribe.rb
|
78
|
+
- lib/scribe/debug.rb
|
77
79
|
- lib/scribe/safe_client.rb
|
78
80
|
- lib/scribe/scribe.rb
|
79
81
|
- test/scribe_test.rb
|
metadata.gz.sig
CHANGED
Binary file
|