diff options
author | hut <hut@lavabit.com> | 2009-07-19 16:36:31 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-19 16:36:31 +0200 |
commit | 529d411bf96b9bf0c57dd06f5afecc65e91a136d (patch) | |
tree | 3c81e7a60531bb8772c96cf4fcb56a4ba5df656b | |
parent | ad6460c301cb27c6b57d3d0f30b2674fdc5779a7 (diff) | |
download | ranger-529d411bf96b9bf0c57dd06f5afecc65e91a136d.tar.gz |
configurable debug_level and debug_file
-rw-r--r-- | ranger.conf | 5 | ||||
-rwxr-xr-x | ranger.rb | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ranger.conf b/ranger.conf index 5fcef6bf..628c42d9 100644 --- a/ranger.conf +++ b/ranger.conf @@ -33,6 +33,11 @@ Option.colorscheme = 'default' # If value is >0, there's a short, annoying delay after clicks Option.mouse_interval = 200 +# for debugging. the debug level defines how much is logged. +# 0 = nothing, 1 = fatal errors, 2 = errors, 3 = debug info +Option.debug_level = 3 +Option.debug_file = '/tmp/errorlog' + # ask for a confirmation before deleting things? Option.confirm_string = "yes I am!" Option.confirm = true diff --git a/ranger.rb b/ranger.rb index 5bd71303..413a98b4 100755 --- a/ranger.rb +++ b/ranger.rb @@ -46,6 +46,8 @@ opt = { :preview => true, :mouse => true, :mouse_interval => 200, + :debug_level => 3, + :debug_file => '/tmp/errorlog', :colorscheme => 'default', :cd => ARGV.include?('--cd'), } @@ -64,8 +66,8 @@ load 'data/screensaver/clock.rb' include Debug Debug.setup( :name => 'nyuron', - :file => '/tmp/errorlog', - :level => 3 ) + :file => Option.debug_file, + :level => Option.debug_level ) if pwd and !ARGV.empty? and !File.directory?(pwd) file = Directory::Entry.new(pwd) |