averell23-watchdogger 0.1.1 → 0.1.2

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/bin/watchdogger CHANGED
@@ -25,6 +25,10 @@ module DoggerFlags extend OptiFlagSet
25
25
  description 'Get the daemon status'
26
26
  end
27
27
 
28
+ optional_switch_flag 'trace' do
29
+ description 'Show trace in case of errors.'
30
+ end
31
+
28
32
  and_process!
29
33
  end
30
34
 
@@ -50,5 +54,8 @@ rescue SystemExit
50
54
  # nothing
51
55
  rescue Exception => e
52
56
  puts "Problem with this command: #{e.message}. Exiting."
57
+ if(flags.trace)
58
+ puts e.backtrace
59
+ end
53
60
  exit(1)
54
61
  end
data/lib/dog_log.rb CHANGED
@@ -9,7 +9,7 @@ class DogLog # :nodoc:
9
9
  # but should not usually be called on an active log.
10
10
  def setup(logfile, severity)
11
11
  @logfile = logfile
12
- @severity = severity
12
+ @severity = Logger.const_get(severity.upcase)
13
13
  if(@logger)
14
14
  assit_fail('Resetting logfile')
15
15
  @logger.close if(@logger.respond_to?(:close))
data/sample_config.yml CHANGED
@@ -11,6 +11,6 @@ watchers:
11
11
  actions: log_it
12
12
 
13
13
  interval: 3
14
- logfile: daemon.log
14
+ # logfile: daemon.log
15
15
  pidfile: watcher.pid
16
-
16
+ log_level: warn
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: averell23-watchdogger
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
  - Daniel Hahn