Changeset 33 in tmcsimulator for trunk/src/tmcsim/paramicslog/ParamicsLog.java


Ignore:
Timestamp:
04/29/2016 12:55:04 AM (10 years ago)
Author:
bokumura
Message:

Directory Restructure: All system properties have been deprecated and replaced by the system property: "CONFIG_DIR". If CONFIG_DIR is not specified at run time, it will default to the "config/" directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/paramicslog/ParamicsLog.java

    r2 r33  
    6262        } 
    6363    } 
     64 
     65        private static final String CONFIG_FILE_NAME = "paramics_communicator_logging.properties"; 
    6466     
    6567    /** Error logger. */ 
     
    8789     * Creates the singleton instance of this class. 
    8890     */ 
    89     static 
    90     { 
    91         try  
    92         { 
    93             if (System.getProperty("PARAMICS_LOG_PROPERTIES") != null) 
    94             { 
    95                 instance = new ParamicsLog(System.getProperty("PARAMICS_LOG_PROPERTIES")); 
    96             } 
    97             else 
    98             { 
    99                 throw new Exception("PARAMICS_LOG_PROPERTIES system property not defined."); 
    100             } 
     91    static { 
     92        try { 
     93                if(System.getProperty("CONFIG_DIR") == null){ 
     94                System.setProperty("CONFIG_DIR", "config"); 
     95            } 
     96                 
     97                instance = new ParamicsLog(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME); 
    10198        }  
    10299        catch (Exception e)  
Note: See TracChangeset for help on using the changeset viewer.