Remove extra logging options
authorStavros Sachtouris <saxtouri@admin.grnet.gr>
Thu, 18 Apr 2013 15:16:55 +0000 (18:16 +0300)
committerStavros Sachtouris <saxtouri@admin.grnet.gr>
Thu, 18 Apr 2013 15:18:56 +0000 (18:18 +0300)
One default: ~/.kamaki.log
User can use a custom: kamaki config set log_file <custom log file>

docs/setup.rst
kamaki/logger.py

index 9cbfc3d..2207acf 100644 (file)
@@ -121,7 +121,7 @@ The [global] group is treated by kamaki as a generic group for arbitrary options
 * global.token <user authentication token>
 
 * global.log_file <logfile full path>
-    set a custom location for kamaki logging. Default values are ~/.kamaki.log, /tmp/kamaki.log and ./kamaki.log (in that order)
+    set a custom location for kamaki logging. Default value is ~/.kamaki.log
 
 * global.log_token <on|off>
     allow kamaki to log user tokens
@@ -175,9 +175,7 @@ Kamaki log file path is set by the following command::
 
     $ kamaki config set log_file <logfile path>
 
-By default, kamaki keeps a list of possible logfile locations::
-
-    ~/.kamaki.log, /tmp/kamaki.log, ./kamaki.log
+By default, kamaki logs at ~/.kamaki.log
 
 When initialized, kamaki attempts to open one of these locations for writing, in the order presented above and uses the first accessible for appending logs. If the log_file option is set, kamaki prepends the value of this option to the logfile list, so the custom location will be the first one kamaki will attetmpt to log at.
 
index 00a7c60..e84b0e5 100644 (file)
 # or implied, of GRNET S.A.
 
 from os import chmod
+from os.path import expanduser
 import logging
 
 
-LOG_FILE = ['kamaki.log', '/tmp/kamaki.log']
+LOG_FILE = [expanduser('~/.kamaki.log')]
 
 
 def get_log_filename():