Changeset 349:4a23a0617b2f in finroc_tools_gui-java


Ignore:
Timestamp:
14.07.2019 14:16:35 (4 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Adds command line option for log config file

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • help.txt

    r342 r349  
    1111                          (same syntax as many other Linux GUI applications; 
    1212                           WIDTH, HEIGHT, X, and Y are all optional)  
     13--log-config=<value>      Log config file 
    1314--connect=<address>       Connects with the specified address using the default  
    1415                          connection type stored in the specified .fingui file 
  • util/CommonCommandLineOptions.java

    r343 r349  
    4040     */ 
    4141    public boolean handles(String option) { 
    42         return option.startsWith(GEOMETRY_OPTION_STRING); 
     42        return option.startsWith(GEOMETRY_OPTION_STRING) || option.startsWith(LOG_CONFIG_OPTION_STRING); 
    4343    } 
    4444 
     
    7373                throw new Exception("Invalid GEOMETRY string '" + s + "'"); 
    7474            } 
     75        } else if (option.startsWith(LOG_CONFIG_OPTION_STRING)) { 
     76            String s = option.substring(LOG_CONFIG_OPTION_STRING.length()); 
     77            org.rrlib.logging.LogDomainRegistry.getInstance().configureFromFile(s); 
    7578        } 
    7679    } 
     
    100103 
    101104    private final static String GEOMETRY_OPTION_STRING = "--geometry="; 
     105    private final static String LOG_CONFIG_OPTION_STRING = "--log-config="; 
    102106 
    103107    /** Values regarding window geometry; they are != null if specified on the command line */ 
Note: See TracChangeset for help on using the changeset viewer.