]> git.mxchange.org Git - flightgear.git/commitdiff
Use some more logging class variety.
authorThorstenB <brehmt@gmail.com>
Thu, 11 Aug 2011 22:09:26 +0000 (00:09 +0200)
committerThorstenB <brehmt@gmail.com>
Thu, 11 Aug 2011 22:09:26 +0000 (00:09 +0200)
Stop using SG_GENERAL and SG_ALL everywhere. Using different
classes makes switching the classes really useful...

17 files changed:
src/Environment/atmosphere.cxx
src/Environment/environment.cxx
src/Environment/environment_ctrl.cxx
src/Environment/environment_mgr.cxx
src/Environment/fgmetar.cxx
src/Environment/metarproperties.cxx
src/Environment/realwx_ctrl.cxx
src/Main/fg_props.cxx
src/Main/logger.cxx
src/Main/main.cxx
src/Scenery/tilemgr.cxx
src/Sound/beacon.cxx
src/Sound/fg_fx.cxx
src/Sound/voice.cxx
src/Sound/voiceplayer.cxx
src/Systems/electrical.cxx
src/Systems/system_mgr.cxx

index b7e7be9517193a30c033abb53c07ebb67c8c94cd..022ea540ec65a9045eadd131438bde3a87785b76 100644 (file)
@@ -108,7 +108,7 @@ pair<double,double> PT_vs_hpt(
   }
   
 // Should never get here.
-  SG_LOG(SG_GENERAL, SG_ALERT, "PT_vs_hpt: ran out of layers for h=" << hh );
+  SG_LOG(SG_ENVIRONMENT, SG_ALERT, "PT_vs_hpt: ran out of layers for h=" << hh );
   return make_pair(d0, d0);
 }
 
@@ -250,7 +250,7 @@ double FGAtmo::QNH(const double field_elev, const double field_press) {
     double rslt =  field_press
             * pow(1. + ISA::lam0 * field_elev / ISA::T0 * prat, 1./nn);
 #if 0
-    SG_LOG(SG_GENERAL, SG_ALERT, "QNH: elev: " << field_elev
+    SG_LOG(SG_ENVIRONMENT, SG_ALERT, "QNH: elev: " << field_elev
                 << "  press: " << field_press
                 << "  prat: "  << prat
                 << "  rslt: " << rslt
index 4e245554b34a06b1458e05cfb77a83d1ac4318bb..e927c3503494f60828515b9a4f3677f8b3c7b6b1 100644 (file)
@@ -678,13 +678,13 @@ FGEnvironment::_recalc_sl_temperature ()
 
 #if 0
   {
-    SG_LOG(SG_GENERAL, SG_DEBUG, "recalc_sl_temperature: using "
+    SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "recalc_sl_temperature: using "
       << temperature_degc << " @ " << elevation_ft << " :: " << this);
   }
 #endif
 
   if (elevation_ft * atmodel::foot >= ISA_def[1].height) {
-    SG_LOG(SG_GENERAL, SG_ALERT, "recalc_sl_temperature: "
+    SG_LOG(SG_ENVIRONMENT, SG_ALERT, "recalc_sl_temperature: "
         << "valid only in troposphere, not " << elevation_ft);
     return;
   }
@@ -728,7 +728,7 @@ FGEnvironment::_recalc_sl_pressure ()
   using namespace atmodel;
 #if 0
   {
-    SG_LOG(SG_GENERAL, SG_ALERT, "recalc_sl_pressure: using "
+    SG_LOG(SG_ENVIRONMENT, SG_ALERT, "recalc_sl_pressure: using "
       << pressure_inhg << " and "
       << temperature_degc << " @ " << elevation_ft << " :: " << this);
   }
@@ -749,7 +749,7 @@ FGEnvironment::_recalc_alt_pt ()
   {
     static int count(0);
     if (++count % 1000 == 0) {
-      SG_LOG(SG_GENERAL, SG_ALERT, 
+      SG_LOG(SG_ENVIRONMENT, SG_ALERT, 
            "recalc_alt_pt for: " << elevation_ft
         << "  using "  << pressure_sea_level_inhg 
         << "  and "  << temperature_sea_level_degc
index c182f06250cf250e62993e3b77f726c02e9b3992..e7c8820fa4a3d82a686577587b1d3eb315f85327 100644 (file)
@@ -182,7 +182,7 @@ void LayerTable::read(FGEnvironment * parent )
     // cleanup entries with (almost)same altitude
     for( size_type n = 1; n < size(); n++ ) {
         if( fabs(at(n)->altitude_ft - at(n-1)->altitude_ft ) < 1 ) {
-            SG_LOG( SG_GENERAL, SG_ALERT, "Removing duplicate altitude entry in environment config for altitude " << at(n)->altitude_ft );
+            SG_LOG( SG_ENVIRONMENT, SG_ALERT, "Removing duplicate altitude entry in environment config for altitude " << at(n)->altitude_ft );
             erase( begin() + n );
         }
     }
index 2eaaa8e7feb6bfad991ed11061525edf4fae2f54..2e8ae0a929023d51186b6176c64989e52ef2f17a 100644 (file)
@@ -134,7 +134,7 @@ FGEnvironmentMgr::~FGEnvironmentMgr ()
 void
 FGEnvironmentMgr::init ()
 {
-  SG_LOG( SG_GENERAL, SG_INFO, "Initializing environment subsystem");
+  SG_LOG( SG_ENVIRONMENT, SG_INFO, "Initializing environment subsystem");
   SGSubsystemGroup::init();
   fgClouds->Init();
 
@@ -150,7 +150,7 @@ FGEnvironmentMgr::init ()
 void
 FGEnvironmentMgr::reinit ()
 {
-  SG_LOG( SG_GENERAL, SG_INFO, "Reinitializing environment subsystem");
+  SG_LOG( SG_ENVIRONMENT, SG_INFO, "Reinitializing environment subsystem");
   SGSubsystemGroup::reinit();
 }
 
@@ -265,7 +265,7 @@ FGEnvironmentMgr::update (double dt)
       // update closest airport information
       _positionTimeToLive = 30.0;
 
-      SG_LOG(SG_ALL, SG_INFO, "FGEnvironmentMgr::update: updating closest airport");
+      SG_LOG(SG_ENVIRONMENT, SG_INFO, "FGEnvironmentMgr::update: updating closest airport");
 
       SGGeod pos = SGGeod::fromDeg(_longitude_n->getDoubleValue(),
                                    _latitude_n->getDoubleValue());
@@ -273,7 +273,7 @@ FGEnvironmentMgr::update (double dt)
       FGAirport * nearestAirport = FGAirport::findClosest(pos, 100.0);
       if( nearestAirport == NULL )
       {
-          SG_LOG(SG_ALL,SG_WARN,"FGEnvironmentMgr::update: No airport within 100NM range");
+          SG_LOG(SG_ENVIRONMENT,SG_WARN,"FGEnvironmentMgr::update: No airport within 100NM range");
       }
       else
       {
@@ -428,7 +428,7 @@ void
 FGEnvironmentMgr::set_cloud_layer_coverage_type (int index, int type )
 {
   if( type < 0 || type >= SGCloudLayer::SG_MAX_CLOUD_COVERAGES ) {
-    SG_LOG(SG_ALL,SG_WARN,"Unknown cloud layer type " << type << " ignored" );
+    SG_LOG(SG_ENVIRONMENT,SG_WARN,"Unknown cloud layer type " << type << " ignored" );
     return;
   }
 
index c9d046ca9883b566dab88bf66f9c72bdfbf8c91d..d69bc264ab8998a62980ca809d6aeafb1aaa3386 100644 (file)
@@ -148,11 +148,11 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co
 
        _time = sgTimeGetGMT(_year - 1900, _month - 1, _day, _hour, _minute, 0);
 
-       SG_LOG(SG_GENERAL, SG_INFO, _data);
+       SG_LOG(SG_ENVIRONMENT, SG_INFO, _data);
        if (_x_proxy)
-               SG_LOG(SG_GENERAL, SG_INFO, "METAR from proxy");
+               SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from proxy");
        else
-               SG_LOG(SG_GENERAL, SG_INFO, "METAR from weather.noaa.gov");
+               SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from weather.noaa.gov");
 }
 
 
index 11971f08c4d9ffbc8bebced7c28aa7afd71a8595..4c93aaa97e2db4fdc5ea1bea0a3cdb315ebcb154 100644 (file)
@@ -83,7 +83,7 @@ inline void MagneticVariation::recalc( double lon, double lat, double alt )
   // calculation of magnetic variation is expensive. Cache the position
   // and perform this calculation only if it has changed
   if( _lon != lon || _lat != lat || _alt != alt ) {
-    SG_LOG(SG_ALL, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt );
+    SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt );
     _lon = lon;
     _lat = lat;
     _alt = alt;
@@ -194,7 +194,7 @@ void MetarProperties::set_metar( const char * metar )
         m = new FGMetar( _metar );
     }
     catch( sg_io_exception ) {
-        SG_LOG( SG_GENERAL, SG_WARN, "Can't parse metar: " << _metar );
+        SG_LOG( SG_ENVIRONMENT, SG_WARN, "Can't parse metar: " << _metar );
         _metarValidNode->setBoolValue(false);
         return;
     }
index b3a55331d7361de9697f4ad1dacce5c45c90b5bf..c897d74b7cf77562daa18f265d351c79293407b1 100644 (file)
@@ -137,7 +137,7 @@ BasicRealWxController::BasicRealWxController( SGPropertyNode_ptr rootNode ) :
 
     PropertyList metars = rootNode->getChildren("metar");
     for( PropertyList::size_type i = 1; i < metars.size(); i++ ) {
-       SG_LOG( SG_ALL, SG_INFO, "Adding metar properties at " << metars[i]->getStringValue() );
+       SG_LOG( SG_ENVIRONMENT, SG_INFO, "Adding metar properties at " << metars[i]->getStringValue() );
         _metarProperties.push_back( new LiveMetarProperties( 
             fgGetNode( metars[i]->getStringValue(), true )));
     }
@@ -256,7 +256,7 @@ public:
         if (responseCode() == 200) {
             wxController->gotMetar(stationId, metar);
         } else {
-            SG_LOG(SG_IO, SG_WARN, "metar download failed:" << url() << ": reason:" << responseReason());
+            SG_LOG(SG_ENVIRONMENT, SG_WARN, "metar download failed:" << url() << ": reason:" << responseReason());
         }
     }
     
@@ -302,23 +302,23 @@ void NoaaMetarRealWxController::update( bool first, double dt )
 
     if( _positionTimeToLive <= 0.0 ) {
         // check nearest airport
-        SG_LOG(SG_ALL, SG_INFO, "NoaaMetarRealWxController::update(): (re) checking nearby airport with METAR" );
+        SG_LOG(SG_ENVIRONMENT, SG_INFO, "NoaaMetarRealWxController::update(): (re) checking nearby airport with METAR" );
         _positionTimeToLive = 60.0;
 
         SGGeod pos = SGGeod::fromDeg(_longitude_n->getDoubleValue(), _latitude_n->getDoubleValue());
 
         FGAirport * nearestAirport = FGAirport::findClosest(pos, 10000.0, MetarAirportFilter::instance() );
         if( nearestAirport == NULL ) {
-            SG_LOG(SG_ALL,SG_WARN,"RealWxController::update can't find airport with METAR within 10000NM"  );
+            SG_LOG(SG_ENVIRONMENT,SG_WARN,"RealWxController::update can't find airport with METAR within 10000NM"  );
             return;
         }
 
-        SG_LOG(SG_ALL, SG_INFO, 
+        SG_LOG(SG_ENVIRONMENT, SG_INFO, 
             "NoaaMetarRealWxController::update(): nearest airport with METAR is: " << nearestAirport->ident() );
 
         // if it has changed, invalidate the associated METAR
         if( _metarProperties[0]->getStationId() != nearestAirport->ident() ) {
-            SG_LOG(SG_ALL, SG_INFO, 
+            SG_LOG(SG_ENVIRONMENT, SG_INFO, 
                 "NoaaMetarRealWxController::update(): nearest airport with METAR has changed. Old: '" << 
                 _metarProperties[0]->getStationId() <<
                 "', new: '" << nearestAirport->ident() << "'" );
@@ -335,7 +335,7 @@ void NoaaMetarRealWxController::update( bool first, double dt )
             const std::string & stationId = p->getStationId();
             if( stationId.empty() ) continue;
 
-            SG_LOG(SG_ALL, SG_INFO, 
+            SG_LOG(SG_ENVIRONMENT, SG_INFO, 
                 "NoaaMetarRealWxController::update(): spawning load request for station-id '" << stationId << "'" );
             
             _http.makeRequest(new MetarGetRequest(this, stationId));
@@ -345,7 +345,7 @@ void NoaaMetarRealWxController::update( bool first, double dt )
 
 void NoaaMetarRealWxController::gotMetar(const string& stationId, const string& metar)
 {
-    SG_LOG( SG_ALL, SG_INFO, "NoaaMetarRwalWxController::update() received METAR for " << stationId << ": " << metar );
+    SG_LOG( SG_ENVIRONMENT, SG_INFO, "NoaaMetarRwalWxController::update() received METAR for " << stationId << ": " << metar );
     BOOST_FOREACH(LiveMetarProperties* p, _metarProperties) {
         if (p->getStationId() != stationId)
             continue;
index b98f3280570ac6a622644676d06adf8197bd0a4c..103fafecd96ed7d0dc423ede1a5df174f82d0f4f 100644 (file)
@@ -74,7 +74,12 @@ LogClassMapping log_class_mappings [] = {
   LogClassMapping(SG_CLIPPER, "clipper"),
   LogClassMapping(SG_NETWORK, "network"),
   LogClassMapping(SG_INSTR, "instrumentation"),
+  LogClassMapping(SG_ATC, "atc"),
+  LogClassMapping(SG_NASAL, "nasal"),
   LogClassMapping(SG_SYSTEMS, "systems"),
+  LogClassMapping(SG_AI, "ai"),
+  LogClassMapping(SG_ENVIRONMENT, "environment"),
+  LogClassMapping(SG_SOUND, "sound"),
   LogClassMapping(SG_UNDEFD, "")
 };
 
index 2a4561c7300610243673a77866383b08a86550eb..c49904fa9e5da932b28e96ca20fa8485e2a730e0 100644 (file)
@@ -66,7 +66,7 @@ FGLogger::init ()
     log.delimiter = delimiter.c_str()[0];
     log.output = new ofstream(filename.c_str());
     if (!log.output) {
-      SG_LOG(SG_INPUT, SG_ALERT, "Cannot write log to " << filename);
+      SG_LOG(SG_GENERAL, SG_ALERT, "Cannot write log to " << filename);
       continue;
     }
 
index 68fa86de3acdec10126f145d7c1e133b7e7a343c..6fa94dc9bc541dc8b5625535cb864e50b94c4cf2 100644 (file)
@@ -134,8 +134,8 @@ static void fgMainLoop( void ) {
     frame_signal->fireValueChanged();
     SGCloudLayer::enable_bump_mapping = fgGetBool("/sim/rendering/bump-mapping");
     
-    SG_LOG( SG_ALL, SG_DEBUG, "Running Main Loop");
-    SG_LOG( SG_ALL, SG_DEBUG, "======= ==== ====");
+    SG_LOG( SG_GENERAL, SG_DEBUG, "Running Main Loop");
+    SG_LOG( SG_GENERAL, SG_DEBUG, "======= ==== ====");
     
     
   // update "time"
@@ -242,7 +242,7 @@ static void fgMainLoop( void ) {
 
     simgear::AtomicChangeListener::fireChangeListeners();
 
-    SG_LOG( SG_ALL, SG_DEBUG, "" );
+    SG_LOG( SG_GENERAL, SG_DEBUG, "" );
 }
 
 void fgInitSoundManager()
index b7f94ca0875cfa78e0c247a979fa84bd3769f935..75e0b9f9266b5e8972f703feb259c33be920988a 100644 (file)
@@ -279,9 +279,9 @@ FGTileMgr::loadTileModel(const string& modelPath, bool cacheModel)
         string m(exc.getMessage());
         m += " ";
         m += exc.getLocation().asString();
-        SG_LOG( SG_ALL, SG_ALERT, m );
+        SG_LOG( SG_TERRAIN, SG_ALERT, m );
     } catch (const sg_exception& exc) { // XXX may be redundant
-        SG_LOG( SG_ALL, SG_ALERT, exc.getMessage());
+        SG_LOG( SG_TERRAIN, SG_ALERT, exc.getMessage());
     }
     return result;
 }
@@ -330,7 +330,7 @@ void FGTileMgr::update_queues()
             }
         } else
         {
-            SG_LOG(SG_INPUT, SG_ALERT, "Warning: empty tile in cache!");
+            SG_LOG(SG_TERRAIN, SG_ALERT, "Warning: empty tile in cache!");
         }
         tile_cache.next();
         sz++;
index f722891892b7012bf3a230e8bcef0476fbba0a0b..de9a98915131516c05952013a89cf93b32a889f1 100644 (file)
@@ -99,7 +99,7 @@ bool FGBeacon::init() {
         outer->set_reference_dist( 10.0 );
         outer->set_max_dist( 20.0 );
     } catch ( sg_io_exception &e ) {
-        SG_LOG(SG_GENERAL, SG_ALERT, e.getFormattedMessage());
+        SG_LOG(SG_SOUND, SG_ALERT, e.getFormattedMessage());
     }
 
     return true;
index 2953bfe678c6e8ae18c45089425f743a265bc798..376498c7f30ed881b17c480e1ef0465232e2e914 100644 (file)
@@ -71,19 +71,19 @@ FGFX::init()
 
     string path_str = node->getStringValue("path");
     if (path_str.empty()) {
-        SG_LOG(SG_GENERAL, SG_ALERT, "No path in /sim/sound/path");
+        SG_LOG(SG_SOUND, SG_ALERT, "No path in /sim/sound/path");
         return;
     }
     
     SGPath path = globals->resolve_aircraft_path(path_str);
-    SG_LOG(SG_GENERAL, SG_INFO, "Reading sound " << node->getName()
+    SG_LOG(SG_SOUND, SG_INFO, "Reading sound " << node->getName()
            << " from " << path.str());
 
     SGPropertyNode root;
     try {
         readProperties(path.str(), &root);
     } catch (const sg_exception &) {
-        SG_LOG(SG_GENERAL, SG_ALERT,
+        SG_LOG(SG_SOUND, SG_ALERT,
                "Error reading file '" << path.str() << '\'');
         return;
     }
@@ -99,7 +99,7 @@ FGFX::init()
   
                 _sound.push_back(sound);
             } catch ( sg_exception &e ) {
-                SG_LOG(SG_GENERAL, SG_ALERT, e.getFormattedMessage());
+                SG_LOG(SG_SOUND, SG_ALERT, e.getFormattedMessage());
                 delete sound;
             }
         }
index 7ba8b2fb9c8020987d773d2384144cb41e9797c1..df85e1a986799d793a8bc28af500f7d67bdcd8c1 100644 (file)
@@ -68,7 +68,7 @@ void FGVoiceMgr::init()
                for (unsigned int i = 0; i < voices.size(); i++)
                        _voices.push_back(new FGVoice(this, voices[i]));
        } catch (const string& s) {
-               SG_LOG(SG_IO, SG_ALERT, "VOICE: " << s);
+               SG_LOG(SG_SOUND, SG_ALERT, "VOICE: " << s);
        }
 
 #if defined(ENABLE_THREADS)
@@ -105,7 +105,7 @@ FGVoiceMgr::FGVoice::FGVoice(FGVoiceMgr *mgr, const SGPropertyNode_ptr node) :
        _festival(node->getBoolValue("festival", true)),
        _mgr(mgr)
 {
-       SG_LOG(SG_IO, SG_INFO, "VOICE: adding `" << node->getStringValue("desc", "<unnamed>")
+       SG_LOG(SG_SOUND, SG_INFO, "VOICE: adding `" << node->getStringValue("desc", "<unnamed>")
                        << "' voice");
        const string &host = _mgr->_host;
        const string &port = _mgr->_port;
@@ -124,7 +124,7 @@ FGVoiceMgr::FGVoice::FGVoice(FGVoiceMgr *mgr, const SGPropertyNode_ptr node) :
                                        + "'. Either it's not\n       Festival listening,"
                                        " or Festival couldn't open a sound device.";
 
-               SG_LOG(SG_IO, SG_INFO, "VOICE: connection to Festival server on `"
+               SG_LOG(SG_SOUND, SG_INFO, "VOICE: connection to Festival server on `"
                                << host << ':' << port << "' established");
 
                setVolume(_volume = _volumeNode->getDoubleValue());
index 054a771fc37513d397db91bd041c13b86dc34c8b..2cd2f127c1fa44974864f2cd19d3f2d383127e35 100644 (file)
@@ -214,7 +214,7 @@ FGVoicePlayer::get_sample (const char *name)
         }
         catch (const sg_exception &e)
         {
-            SG_LOG(SG_INSTR, SG_ALERT, "Error loading sound sample \"" + filename + "\": " + e.getFormattedMessage());
+            SG_LOG(SG_SOUND, SG_ALERT, "Error loading sound sample \"" + filename + "\": " + e.getFormattedMessage());
             exit(1);
         }
 
index d711b4dcac67487a4fc9133e6a1c92feb33bcc29..16de41f581e366d208d317d4d8c3cf2af3fe7069 100644 (file)
@@ -119,7 +119,7 @@ float FGElectricalSupplier::apply_load( float amps, float dt ) {
         float available_amps = ideal_amps;
         return available_amps - amps;
     } else {
-        SG_LOG( SG_ALL, SG_ALERT, "unknown supplier type" );
+        SG_LOG( SG_SYSTEMS, SG_ALERT, "unknown supplier type" );
     }
 
     return 0.0;
@@ -151,7 +151,7 @@ float FGElectricalSupplier::get_output_volts() {
         // cout << "external amps = " << 0.0 << endl;
         return ideal_volts;
     } else {
-        SG_LOG( SG_ALL, SG_ALERT, "unknown supplier type" );
+        SG_LOG( SG_SYSTEMS, SG_ALERT, "unknown supplier type" );
     }
 
     return 0.0;
@@ -180,7 +180,7 @@ float FGElectricalSupplier::get_output_amps() {
         // cout << "external amps = " << 0.0 << endl;
         return ideal_amps;
     } else {
-        SG_LOG( SG_ALL, SG_ALERT, "unknown supplier type" );
+        SG_LOG( SG_SYSTEMS, SG_ALERT, "unknown supplier type" );
     }
 
     return 0.0;
@@ -274,12 +274,12 @@ FGElectricalConnector::FGElectricalConnector ( SGPropertyNode *node,
                 } else if ( s->get_kind() == FG_BUS ) {
                     s->add_output( this );
                 } else {
-                    SG_LOG( SG_ALL, SG_ALERT,
+                    SG_LOG( SG_SYSTEMS, SG_ALERT,
                             "Attempt to connect to something that can't provide an output: " 
                             << child->getStringValue() );
                 }
             } else {
-                SG_LOG( SG_ALL, SG_ALERT, "Can't find named source: " 
+                SG_LOG( SG_SYSTEMS, SG_ALERT, "Can't find named source: " 
                         << child->getStringValue() );
             }
         } else if ( cname == "output" ) {
@@ -295,12 +295,12 @@ FGElectricalConnector::FGElectricalConnector ( SGPropertyNode *node,
                             == FGElectricalSupplier::FG_BATTERY ) {
                     s->add_output( this );
                 } else {
-                    SG_LOG( SG_ALL, SG_ALERT,
+                    SG_LOG( SG_SYSTEMS, SG_ALERT,
                             "Attempt to connect to something that can't provide an input: " 
                             << child->getStringValue() );
                 }
             } else {
-                SG_LOG( SG_ALL, SG_ALERT, "Can't find named source: " 
+                SG_LOG( SG_SYSTEMS, SG_ALERT, "Can't find named source: " 
                         << child->getStringValue() );
             }
         } else if ( cname == "switch" ) {
@@ -362,7 +362,7 @@ void FGElectricalSystem::init () {
     SGPropertyNode *path_n = fgGetNode("/sim/systems/electrical/path");
     if ( path_n ) {
         if ( path.length() ) {
-            SG_LOG( SG_ALL, SG_INFO,
+            SG_LOG( SG_SYSTEMS, SG_INFO,
                     "NOTICE: System manager configuration specifies an " <<
                     "electrical system: " << path << " but it is " <<
                     "being overridden by the one specified in the -set.xml " <<
@@ -376,7 +376,7 @@ void FGElectricalSystem::init () {
         SGPath config = globals->resolve_aircraft_path(path);
         
         // load an obsolete xml configuration
-        SG_LOG( SG_ALL, SG_WARN,
+        SG_LOG( SG_SYSTEMS, SG_WARN,
                 "Reading deprecated xml electrical system model from\n    "
                 << config.str() );
         try {
@@ -385,21 +385,21 @@ void FGElectricalSystem::init () {
             if ( build(config_props) ) {
                 enabled = true;
             } else {
-                SG_LOG( SG_ALL, SG_ALERT,
+                SG_LOG( SG_SYSTEMS, SG_ALERT,
                         "Detected a logic error in the electrical system ");
-                SG_LOG( SG_ALL, SG_ALERT,
+                SG_LOG( SG_SYSTEMS, SG_ALERT,
                         "specification file.  See earlier errors for " );
-                SG_LOG( SG_ALL, SG_ALERT,
+                SG_LOG( SG_SYSTEMS, SG_ALERT,
                         "details.");
                 exit(-1);
             }        
         } catch (const sg_exception&) {
-            SG_LOG( SG_ALL, SG_ALERT,
+            SG_LOG( SG_SYSTEMS, SG_ALERT,
                     "Failed to load electrical system model: "
                     << config.str() );
         }
     } else {
-        SG_LOG( SG_ALL, SG_INFO,
+        SG_LOG( SG_SYSTEMS, SG_INFO,
                 "No xml-based electrical model specified for this model!");
     }
 
@@ -455,7 +455,7 @@ void FGElectricalSystem::update (double dt) {
                               " " );
 
             if ( node->apply_load( load, dt ) < 0.0 ) {
-                SG_LOG(SG_ALL, SG_ALERT,
+                SG_LOG(SG_SYSTEMS, SG_ALERT,
                        "Error drawing more current than available!");
             }
         }     
@@ -475,7 +475,7 @@ void FGElectricalSystem::update (double dt) {
                               " " );
 
             if ( node->apply_load( load, dt ) < 0.0 ) {
-                SG_LOG(SG_ALL, SG_ALERT,
+                SG_LOG(SG_SYSTEMS, SG_ALERT,
                        "Error drawing more current than available!");
             }
         }     
@@ -496,7 +496,7 @@ void FGElectricalSystem::update (double dt) {
             // cout << "battery load = " << load << endl;
 
             if ( node->apply_load( load, dt ) < 0.0 ) {
-                SG_LOG(SG_ALL, SG_ALERT,
+                SG_LOG(SG_SYSTEMS, SG_ALERT,
                        "Error drawing more current than available!");
             }
         }     
@@ -579,7 +579,7 @@ bool FGElectricalSystem::build (SGPropertyNode* config_props) {
                 new FGElectricalConnector( node, this );
             connectors.push_back( c );
         } else {
-            SG_LOG( SG_ALL, SG_ALERT, "Unknown component type specified: " 
+            SG_LOG( SG_SYSTEMS, SG_ALERT, "Unknown component type specified: " 
                     << name );
             return false;
         }
@@ -637,7 +637,7 @@ float FGElectricalSystem::propagate( FGElectricalComponent *node, double dt,
         }
         // cout << s << "  input_volts = " << volts << endl;
     } else {
-        SG_LOG( SG_ALL, SG_ALERT, "unkown node type" );
+        SG_LOG( SG_SYSTEMS, SG_ALERT, "unkown node type" );
     }
 
     int i;
index 0ca9efb7a1b0eca305ab0b23372ddb56762231d9..ce43ddbf847a790bf6bdd78aec248fd2f9ef33fc 100644 (file)
@@ -36,7 +36,7 @@ FGSystemMgr::FGSystemMgr ()
     if (path_n) {
         SGPath config = globals->resolve_aircraft_path(path_n->getStringValue());
 
-        SG_LOG( SG_ALL, SG_INFO, "Reading systems from "
+        SG_LOG( SG_SYSTEMS, SG_INFO, "Reading systems from "
                 << config.str() );
         try {
             readProperties( config.str(), config_props );
@@ -44,21 +44,21 @@ FGSystemMgr::FGSystemMgr ()
             if ( build(config_props) ) {
                 enabled = true;
             } else {
-                SG_LOG( SG_ALL, SG_ALERT,
+                SG_LOG( SG_SYSTEMS, SG_ALERT,
                         "Detected an internal inconsistency in the systems");
-                SG_LOG( SG_ALL, SG_ALERT,
+                SG_LOG( SG_SYSTEMS, SG_ALERT,
                         " system specification file.  See earlier errors for" );
-                SG_LOG( SG_ALL, SG_ALERT,
+                SG_LOG( SG_SYSTEMS, SG_ALERT,
                         " details.");
                 exit(-1);
             }        
         } catch (const sg_exception&) {
-            SG_LOG( SG_ALL, SG_ALERT, "Failed to load systems system model: "
+            SG_LOG( SG_SYSTEMS, SG_ALERT, "Failed to load systems system model: "
                     << config.str() );
         }
 
     } else {
-        SG_LOG( SG_ALL, SG_WARN,
+        SG_LOG( SG_SYSTEMS, SG_WARN,
                 "No systems model specified for this model!");
     }
 
@@ -92,7 +92,7 @@ bool FGSystemMgr::build (SGPropertyNode* config_props)
             set_subsystem( "system" + temp.str(), 
                            new VacuumSystem( node ) );
         } else {
-            SG_LOG( SG_ALL, SG_ALERT, "Unknown top level section: " 
+            SG_LOG( SG_SYSTEMS, SG_ALERT, "Unknown top level section: " 
                     << name );
             return false;
         }