kostya-bluepill 0.0.60.1 → 0.0.60.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -256,23 +256,23 @@ The main benefit of using the config options is that Bluepill will be able to mo
256
256
  ### CLI
257
257
  To start a bluepill process and load a config:
258
258
 
259
- sudo bluepill load /path/to/production.pill
259
+ bluepill load /path/to/production.pill
260
260
 
261
261
  To act on a process or group:
262
262
 
263
- sudo bluepill <start|stop|restart|unmonitor> <process_or_group_name>
263
+ bluepill <start|stop|restart|unmonitor> <process_or_group_name>
264
264
 
265
265
  To view process statuses:
266
266
 
267
- sudo bluepill status
267
+ bluepill status
268
268
 
269
269
  To view the log for a process or group:
270
270
 
271
- sudo bluepill log <process_or_group_name>
271
+ bluepill log <process_or_group_name>
272
272
 
273
273
  To quit bluepill:
274
274
 
275
- sudo bluepill quit
275
+ bluepill quit
276
276
 
277
277
  ### Logging
278
278
  By default, bluepill uses syslog local6 facility as described in the installation section. But if for any reason you don&apos;t want to use syslog, you can use a log file. You can do this by setting the :log\_file option in the config:
@@ -7,20 +7,22 @@ module Bluepill
7
7
 
8
8
  attr_accessor :name, :logger, :base_dir, :socket, :pid_file, :kill_timeout
9
9
  attr_accessor :groups, :work_queue
10
- attr_accessor :pids_dir
10
+ attr_accessor :pids_dir, :log_file
11
11
 
12
12
  def initialize(name, options = {})
13
13
  self.name = name
14
14
 
15
15
  @foreground = options[:foreground]
16
+ self.log_file = options[:log_file]
16
17
  self.base_dir = options[:base_dir] || File.join(ENV['HOME'], '.bluepill')
17
18
  self.pid_file = File.join(self.base_dir, 'pids', self.name + ".pid")
18
19
  self.pids_dir = File.join(self.base_dir, 'pids', self.name)
19
20
  self.kill_timeout = options[:kill_timeout] || 10
20
21
 
21
22
  self.groups = {}
22
-
23
- self.logger = Madvertise::Logging::ImprovedLogger.new(foreground? ? :syslog : STDERR, "bluepill-#{self.name}")
23
+
24
+ log_dev = foreground? ? :syslog : (self.log_file || STDERR)
25
+ self.logger = Madvertise::Logging::ImprovedLogger.new(log_dev, "bluepill-#{self.name}")
24
26
 
25
27
  self.setup_signal_traps
26
28
  self.setup_pids_dir
@@ -1,4 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Bluepill
3
- VERSION = "0.0.60.1".freeze
3
+ VERSION = "0.0.60.2".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kostya-bluepill
3
3
  version: !ruby/object:Gem::Version
4
- hash: 189
4
+ hash: 187
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 60
10
- - 1
11
- version: 0.0.60.1
10
+ - 2
11
+ version: 0.0.60.2
12
12
  platform: ruby
13
13
  authors:
14
14
  - Arya Asemanfar
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2012-08-15 00:00:00 +04:00
21
+ date: 2012-08-16 00:00:00 +04:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency