File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
services/alarm-logger/src/main/java/org/phoebus/alarm/logging Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -77,13 +77,12 @@ private static boolean handleShellCommands(final String... args) throws Throwabl
7777 }
7878
7979 public static void main (final String [] original_args ) throws Exception {
80- context = SpringApplication .run (AlarmLoggingService .class , original_args );
8180 LogManager .getLogManager ().readConfiguration (AlarmLoggingService .class .getResourceAsStream ("/alarm_logger_logging.properties" ));
8281
8382 // load the default properties
8483 final Properties properties = PropertiesHelper .getProperties ();
8584
86- // Use interactive shell by default
85+ // Use interactive shell by default
8786 boolean use_shell = true ;
8887
8988 // Handle arguments
@@ -96,8 +95,7 @@ public static void main(final String[] original_args) throws Exception {
9695 if ( cmd .equals ("-h" ) || cmd .equals ("-help" )) {
9796 use_shell = false ;
9897 help ();
99- // Do we need the exit code for help?
100- System .exit (SpringApplication .exit (context ));
98+ System .exit (0 );
10199 return ;
102100 } else if (cmd .equals ("-noshell" )) {
103101 use_shell = false ;
@@ -196,11 +194,12 @@ else if(cmd.equals("-thread_pool_size")){
196194 ex .printStackTrace ();
197195 System .out .println ("\n >>>> Please check available arguments of alarm-logger as follows:" );
198196 help ();
199- System .exit (SpringApplication . exit ( context ) );
197+ System .exit (- 1 );
200198 return ;
201199 }
202200
203201 logger .info ("Alarm Logging Service (PID " + ProcessHandle .current ().pid () + ")" );
202+ context = SpringApplication .run (AlarmLoggingService .class , original_args );
204203
205204 // Create scheduler with configured or default thread pool size
206205 Integer threadPoolSize ;
You can’t perform that action at this time.
0 commit comments