Add the PYSAWSIM_LOG_LEVEL environmental variable.
[sawsim.git] / pysawsim / sawsim.py
index 0f85869dd634111a0ce0f64d65a9700895f6d8f1..da726c749143bc59382c146c0d54c66a3b9275e6 100644 (file)
@@ -37,6 +37,7 @@ import shutil
 from uuid import uuid4
 
 from . import __version__
+from . import PYSAWSIM_LOG_LEVEL_MSG as _PYSAWSIM_LOG_LEVEL_MSG
 from .manager import MANAGERS, get_manager, InvokeJob
 
 
@@ -302,9 +303,11 @@ def main(argv=None):
     epilog = '\n'.join([
             'Python wrapper around `sawsim`.  Distribute `N` runs using',
             'one of the possible job "managers".  Also supports caching',
-            'results to speed future runs.'
+            'results to speed future runs.',
+            _PYSAWSIM_LOG_LEVEL_MSG,
             ])
     parser = OptionParser(usage, epilog=epilog)
+    parser.format_epilog = lambda formatter: epilog+'\n'
     for option in sr.optparse_options:
         parser.add_option(option)