|
|
@@ -1,5 +1,6 @@
|
|
|
package com.uas.search.console.b2b;
|
|
|
|
|
|
+import java.io.File;
|
|
|
import java.io.FileOutputStream;
|
|
|
import java.io.IOException;
|
|
|
import java.io.NotSerializableException;
|
|
|
@@ -33,7 +34,11 @@ import com.uas.search.console.b2b.util.SearchConstants.DataSourceQualifier;
|
|
|
public class Application {
|
|
|
|
|
|
public static void main(String[] args) throws NotSerializableException, ClassNotFoundException, IOException {
|
|
|
- System.setErr(new PrintStream(new FileOutputStream("logs/log.log", true)));
|
|
|
+ File logFile = new File("logs/log.log");
|
|
|
+ if (!logFile.getParentFile().exists()) {
|
|
|
+ logFile.getParentFile().mkdir();
|
|
|
+ }
|
|
|
+ System.setErr(new PrintStream(new FileOutputStream(logFile, true)));
|
|
|
SpringApplication application = new SpringApplication(Application.class);
|
|
|
application.addListeners(new ContextUtils());
|
|
|
application.run(args);
|