fix in sql schema - for f37/pgsql14 (2) : will no longer work in f35/pgsql13 though
[plcapi.git] / PLC / Logger.py
index aa2eb79..6102972 100644 (file)
@@ -11,6 +11,12 @@ import logging.config
 global_filename = "/var/log/plcapi.log"
 if 'PLCAPILOG' in os.environ:
     global_filename = os.environ['PLCAPILOG']
+else:
+    try:
+        with open(global_filename, 'a') as just_checking:
+            pass
+    except OSError:
+        global_filename = "/tmp/plcapi.log"
 
 plcapi_logging_config = {
     'version': 1,