From 885f3f9b3a2a97b65ad427340fcabb56a41dfe08 Mon Sep 17 00:00:00 2001 From: mfranz Date: Fri, 31 Mar 2006 16:56:14 +0000 Subject: [PATCH] - use proper error output method - warnings-- --- src/Airports/dynamics.cxx | 8 +++----- src/Airports/runwayprefs.cxx | 6 ++---- src/Traffic/TrafficMgr.cxx | 6 ++---- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/Airports/dynamics.cxx b/src/Airports/dynamics.cxx index def5007ae..b4816611c 100644 --- a/src/Airports/dynamics.cxx +++ b/src/Airports/dynamics.cxx @@ -57,8 +57,8 @@ SG_USING_STD(random_shuffle); /********** FGAirport Dynamics *********************************************/ FGAirportDynamics::FGAirportDynamics(double lat, double lon, double elev, string id) : - _latitude(lat), _longitude(lon), + _latitude(lat), _elevation(elev), _id(id) { @@ -437,13 +437,11 @@ void FGAirportDynamics::pi (const char * target, const char * data) { } void FGAirportDynamics::warning (const char * message, int line, int column) { - //cout << "Warning: " << message << " (" << line << ',' << column << ')' - // << endl; + SG_LOG(SG_IO, SG_WARN, "Warning: " << message << " (" << line << ',' << column << ')'); } void FGAirportDynamics::error (const char * message, int line, int column) { - //cout << "Error: " << message << " (" << line << ',' << column << ')' - // << endl; + SG_LOG(SG_IO, SG_ALERT, "Error: " << message << " (" << line << ',' << column << ')'); } void FGAirportDynamics::setRwyUse(const FGRunwayPreference& ref) diff --git a/src/Airports/runwayprefs.cxx b/src/Airports/runwayprefs.cxx index 1a7f1dd11..60e7f0710 100644 --- a/src/Airports/runwayprefs.cxx +++ b/src/Airports/runwayprefs.cxx @@ -566,11 +566,9 @@ void FGRunwayPreference::pi (const char * target, const char * data) { } void FGRunwayPreference::warning (const char * message, int line, int column) { - //cout << "Warning: " << message << " (" << line << ',' << column << ')' - // << endl; + SG_LOG(SG_IO, SG_WARN, "Warning: " << message << " (" << line << ',' << column << ')'); } void FGRunwayPreference::error (const char * message, int line, int column) { - //cout << "Error: " << message << " (" << line << ',' << column << ')' - // << endl; + SG_LOG(SG_IO, SG_ALERT, "Error: " << message << " (" << line << ',' << column << ')'); } diff --git a/src/Traffic/TrafficMgr.cxx b/src/Traffic/TrafficMgr.cxx index f49e92636..d9cba6e0c 100644 --- a/src/Traffic/TrafficMgr.cxx +++ b/src/Traffic/TrafficMgr.cxx @@ -268,11 +268,9 @@ void FGTrafficManager::pi (const char * target, const char * data) { } void FGTrafficManager::warning (const char * message, int line, int column) { - cout << "Warning: " << message << " (" << line << ',' << column << ')' - << endl; + SG_LOG(SG_IO, SG_WARN, "Warning: " << message << " (" << line << ',' << column << ')'); } void FGTrafficManager::error (const char * message, int line, int column) { - cout << "Error: " << message << " (" << line << ',' << column << ')' - << endl; + SG_LOG(SG_IO, SG_ALERT, "Error: " << message << " (" << line << ',' << column << ')'); } -- 2.39.5