tapsilog 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.3.3
2
+ Fixed bug with stop/status/restart actions not reading config file
3
+
1
4
  v0.3.2
2
5
  Fixed bug when log message is sent in chunks
3
6
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  gem 'echoe'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('tapsilog', '0.3.2') do |p|
5
+ Echoe.new('tapsilog', '0.3.3') do |p|
6
6
  p.author = "Palmade"
7
7
  p.project = "tapsilog"
8
8
  p.summary = "Hydrid app-level logger from Palmade. Analogger fork."
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- TAPSILOG_VERSION = "0.3.2"
3
+ TAPSILOG_VERSION = "0.3.3"
4
4
 
5
5
  require 'yaml'
6
6
  require 'optparse'
@@ -22,16 +22,14 @@ module Palmade::Tapsilog
22
22
  def self.start
23
23
  loop do
24
24
  catch(:hup) {
25
- if File.exists?(@@config[:configfile])
26
- config = Utils.symbolize_keys(YAML.load(File.read(@@config[:configfile])))
27
- @@config.merge!(config)
28
- end
25
+ read_config
29
26
  Palmade::Tapsilog::Server.start(@@config)
30
27
  }
31
28
  end
32
29
  end
33
30
 
34
31
  def self.stop
32
+ read_config
35
33
  if Utils.pidf_running?(@@config[:pidfile])
36
34
  pid = Utils.pidf_read(@@config[:pidfile])
37
35
  puts "Sending QUIT to #{pid}"
@@ -43,12 +41,14 @@ module Palmade::Tapsilog
43
41
  end
44
42
 
45
43
  def self.restart
44
+ read_config
46
45
  stop
47
46
  Utils.pidf_clean(@@config[:pidfile])
48
47
  start
49
48
  end
50
49
 
51
50
  def self.status
51
+ read_config
52
52
  if Utils.pidf_running?(@@config[:pidfile])
53
53
  pid = Utils.pidf_read(@@config[:pidfile])
54
54
  puts "Tapsilog is running with pid #{pid}"
@@ -91,6 +91,13 @@ module Palmade::Tapsilog
91
91
  end
92
92
  end
93
93
 
94
+ self.read_config
95
+ if File.exists?(@@config[:configfile])
96
+ config = Utils.symbolize_keys(YAML.load(File.read(@@config[:configfile])))
97
+ @@config.merge!(config)
98
+ end
99
+ end
100
+
94
101
  end
95
102
  end
96
103
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- TAPSILOG_VERSION = "0.3.2"
3
+ TAPSILOG_VERSION = "0.3.3"
4
4
 
5
5
  require 'yaml'
6
6
  require 'optparse'
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tapsilog}
5
- s.version = "0.3.2"
5
+ s.version = "0.3.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Palmade"]
9
- s.date = %q{2010-09-24}
9
+ s.date = %q{2010-09-28}
10
10
  s.description = %q{Hydrid app-level logger from Palmade. Analogger fork.}
11
11
  s.email = %q{}
12
12
  s.executables = ["tapsilog", "tapsilog_tail"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapsilog
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Palmade
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-24 00:00:00 +08:00
18
+ date: 2010-09-28 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency