maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH maposmatic 4/9] Add MAPOSMATIC_LOG_LEVEL to the


From: Maxime Petazzoni
Subject: [Maposmatic-dev] [PATCH maposmatic 4/9] Add MAPOSMATIC_LOG_LEVEL to the environment wrapping
Date: Sun, 24 Jan 2010 14:43:18 +0100

---
 scripts/config.py-template |   14 ++++++++++++++
 scripts/wrapper.py         |    1 +
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/scripts/config.py-template b/scripts/config.py-template
index dcb525b..3606098 100755
--- a/scripts/config.py-template
+++ b/scripts/config.py-template
@@ -3,5 +3,19 @@
 
 # Copy this file as 'config.py' and edit the following lines to match your
 # installation.
+
+# Path to your OCitySMap installation
 OCITYSMAP_PATH = '/path/to/ocitysmap'
+
+# Log file for MapOSMatic. Leave empty for stderr.
 MAPOSMATIC_LOG = '/tmp/maposmaticd.log'
+
+# Log level (lower is more verbose)
+# 50: critical
+# 40: error
+# 30: warning
+# 20: info
+# 10: debug
+#  0: not set (discouraged)
+MAPOSMATIC_LVL = 20
+
diff --git a/scripts/wrapper.py b/scripts/wrapper.py
index 98709b8..7fc1680 100755
--- a/scripts/wrapper.py
+++ b/scripts/wrapper.py
@@ -35,5 +35,6 @@ if __name__ == '__main__':
                                              os.environ.get('PYTHONPATH', ''))
     os.environ['DJANGO_SETTINGS_MODULE'] = 'www.settings'
     os.environ['MAPOSMATIC_LOG_FILE'] = MAPOSMATIC_LOG
+    os.environ['MAPOSMATIC_LOG_LEVEL'] = str(MAPOSMATIC_LVL)
 
     os.execv(os.path.join(root, sys.argv[1]), sys.argv[1:])
-- 
1.6.3.3.277.g88938c





reply via email to

[Prev in Thread] Current Thread [Next in Thread]