public static void loadConfig ( String options , boolean force ) { if ( sIsInitialized && ! force ) return ; sIsInitialized = true ; Properties commandProperties = unpackOptions ( options ) ; String userHome = getUserHome ( ) ; File userHomeDir = new File ( userHome , Names . EKSTAZI_CONFIG_FILE ) ; Properties homeProperties = getProperties ( userHomeDir ) ; File userDir = new File ( System . getProperty ( "user.dir" ) , Names . EKSTAZI_CONFIG_FILE ) ; Properties userProperties = getProperties ( userDir ) ; loadProperties ( homeProperties ) ; loadProperties ( userProperties ) ; loadProperties ( commandProperties ) ; // Init Log before any print of config/debug. Log . init ( DEBUG_MODE_V == DebugMode . SCREEN || DEBUG_MODE_V == DebugMode . EVERYWHERE , DEBUG_MODE_V == DebugMode . FILE || DEBUG_MODE_V == DebugMode . EVERYWHERE , createFileNameInCoverageDir ( "debug.log" ) ) ; // Print configuration. printVerbose ( userHomeDir , userDir ) ; }
Load configuration from properties .