about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger.conf5
-rwxr-xr-xranger.rb6
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)