]> git.mxchange.org Git - flightgear.git/commitdiff
#367: raise log level for some routemanager error messages
authorThorstenB <brehmt@gmail.com>
Wed, 6 Jul 2011 20:33:19 +0000 (22:33 +0200)
committerThorstenB <brehmt@gmail.com>
Wed, 6 Jul 2011 20:33:19 +0000 (22:33 +0200)
When flightplans cannot be loaded (i.e. --flight-plan command-line
option fails), make sure the message is visible to the user with
default log level.

src/Autopilot/route_mgr.cxx

index 044c624c8e7919bfb79d920586da760b54b1d01e..bb93274838717230f386111c5d1ca030a6950d5f 100644 (file)
@@ -380,7 +380,7 @@ void FGRouteMgr::postinit()
 {
   SGPath path(_pathNode->getStringValue());
   if (path.exists()) {
-    SG_LOG(SG_AUTOPILOT, SG_INFO, "loading flight-plan from:" << path.str());
+    SG_LOG(SG_AUTOPILOT, SG_INFO, "loading flight-plan from: " << path.str());
     loadRoute(path);
   }
   
@@ -1303,7 +1303,7 @@ bool FGRouteMgr::saveRoute(const SGPath& path)
     writeProperties(path.str(), d, true /* write-all */);
     return true;
   } catch (sg_exception& e) {
-    SG_LOG(SG_IO, SG_WARN, "failed to save flight-plan:" << e.getMessage());
+    SG_LOG(SG_IO, SG_ALERT, "Failed to save flight-plan '" << path.str() << "'. " << e.getMessage());
     return false;
   }
 }
@@ -1335,8 +1335,8 @@ bool FGRouteMgr::loadRoute(const SGPath& path)
     }
     return true;
   } catch (sg_exception& e) {
-    SG_LOG(SG_IO, SG_WARN, "failed to load flight-plan (from '" << e.getOrigin()
-      << "'):" << e.getMessage());
+    SG_LOG(SG_IO, SG_ALERT, "Failed to load flight-plan '" << e.getOrigin()
+      << "'" << e.getMessage());
     return false;
   }
 }
@@ -1478,7 +1478,7 @@ bool FGRouteMgr::loadPlainTextRoute(const SGPath& path)
       
       WayptRef w = waypointFromString(line);
       if (!w) {
-        throw sg_io_exception("failed to create waypoint from line:" + line);
+        throw sg_io_exception("Failed to create waypoint from line '" + line + "'.");
       }
       
       wpts.push_back(w);
@@ -1487,7 +1487,7 @@ bool FGRouteMgr::loadPlainTextRoute(const SGPath& path)
     _route = wpts;
     return true;
   } catch (sg_exception& e) {
-    SG_LOG(SG_IO, SG_WARN, "failed to load route from:" << path.str() << ":" << e.getMessage());
+    SG_LOG(SG_IO, SG_ALERT, "Failed to load route from: '" << path.str() << "'. " << e.getMessage());
     return false;
   }
 }