@@ -193,32 +193,6 @@ private static boolean isPortUsing(String host, int port) throws UnknownHostExce
193193 return true ;
194194 }
195195
196- //
197- // /**
198- // * config log4j2 setting
199- // *
200- // * @param logPath
201- // * @throws IOException
202- // * @throws FileNotFoundException
203- // */
204- // private static void createLog4j2Config(File log4jFile, String logPath) throws FileNotFoundException, IOException {
205- //
206- // if (log4jFile.exists()) {
207- // return;
208- // }
209- //
210- // String logTemplate = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<Configuration status=\"INFO\">\n" + " <properties>\n"
211- // + " <property name=\"LOG_PATH\">{{LOG_PATH}}</property>\n" + " </properties>\n" + " <Appenders>\n"
212- // + " <Console name=\"Console\" target=\"SYSTEM_OUT\">\n" + " <PatternLayout pattern=\"%c-%-4r %-5p [%d{yyyy-MM-dd HH:mm:ss}] %m%n\" />\n"
213- // + " </Console>\n" + "\n" + " <RollingRandomAccessFile name=\"File\" fileName=\"${LOG_PATH}\"\n" + " filePattern=\"${LOG_PATH}-%d{yyyyMMdd}\">\n"
214- // + " <PatternLayout pattern=\"%m%n\" />\n" + " <Policies>\n" + " <TimeBasedTriggeringPolicy interval=\"1\"\n"
215- // + " modulate=\"true\" />\n" + " </Policies>\n" + " </RollingRandomAccessFile>\n" + "\n" + " </Appenders>\n" + "\n" + "\n"
216- // + " <Loggers>\n" + " <Root level=\"info\">\n" + " <AppenderRef ref=\"Console\" />\n" + " <AppenderRef ref=\"File\" />\n"
217- // + " </Root>\n" + " </Loggers>\n" + "</Configuration>";
218- //
219- // wirteFile(log4jFile.getAbsolutePath(), "utf-8", logTemplate.replace("{{LOG_PATH}}", logPath));
220- //
221- // }
222196
223197 private static void parseFile (String file ) throws UnsupportedEncodingException , FileNotFoundException , IOException {
224198 try (BufferedReader br = new BufferedReader (new InputStreamReader (new FileInputStream (file ), "utf-8" ))) {
@@ -253,10 +227,6 @@ private static void parseFile(String file) throws UnsupportedEncodingException,
253227 }
254228
255229 private static void makeFiles (File JcoderHome , String logPath ) throws FileNotFoundException , IOException {
256- File tmpDir = new File (JcoderHome , "tmp" ); // create tmp dir
257- if (!tmpDir .exists ()) {
258- tmpDir .mkdirs ();
259- }
260230
261231 File pluginDir = new File (JcoderHome , "web" ); // create web dir
262232 if (!pluginDir .exists ()) {
@@ -268,7 +238,6 @@ private static void makeFiles(File JcoderHome, String logPath) throws FileNotFou
268238 groupDir .mkdirs ();
269239 }
270240
271- // createLog4j2Config(new File(JcoderHome, "log4j2.xml"), logPath);
272241 }
273242
274243 /**
0 commit comments