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 CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
- v0.1.1. Legacy accessors for log levels.
2
+ v0.1.2. Legacy accessors for log levels. Append newlines by default.
3
3
 
4
4
  v0.1. First release.
data/Manifest CHANGED
@@ -5,6 +5,7 @@ README
5
5
  Rakefile
6
6
  conf/scribe.conf
7
7
  lib/scribe.rb
8
+ lib/scribe/debug.rb
8
9
  lib/scribe/safe_client.rb
9
10
  lib/scribe/scribe.rb
10
11
  test/scribe_test.rb
data/conf/scribe.conf CHANGED
@@ -26,7 +26,7 @@ fs_type=std
26
26
  file_path=/tmp/scribetest
27
27
  base_filename=thisisoverwritten
28
28
  max_size=1000000
29
- add_newlines=1
29
+ add_newlines=0
30
30
  </primary>
31
31
 
32
32
  <secondary>
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, and default
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.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-09-30}
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.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-09-30 00:00:00 -07:00
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