osrfAppRegisterApplication() instead of at the end, so that messages
issued during initialization of the application will be properly
identified. This change particularly affects apps that do a lot
of initialization, such as cstore, rstore, and pcrud.
M src/libopensrf/osrf_application.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1952
9efc2488-bf62-4759-914b-
345cdb29e865
appear in subsequent log messages.
*/
int osrfAppRegisterApplication( const char* appName, const char* soFile ) {
- if(!appName || ! soFile) return -1;
+ if( !appName || ! soFile ) return -1;
char* error;
- if(!_osrfAppHash)
+ osrfLogSetAppname( appName );
+
+ if( !_osrfAppHash )
_osrfAppHash = osrfNewHash();
osrfLogInfo( OSRF_LOG_MARK, "Registering application %s with file %s", appName, soFile );
osrfLogInfo( OSRF_LOG_MARK, "Application %s registered successfully", appName );
- osrfLogSetAppname(appName);
-
osrfAppSetOnExit(app, appName);
return 0;