File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 77import java .net .ServerSocket ;
88import java .net .Socket ;
99import java .nio .file .Path ;
10+ import java .nio .file .Paths ;
1011import java .util .concurrent .ExecutorService ;
1112import java .util .concurrent .Executors ;
1213
@@ -17,13 +18,14 @@ public static void main(String[] args) throws IOException {
1718
1819 Path root = new PathExaminer ().getPath (fileDirectory );
1920 ServerSocket serverSocket = new ServerSocket (port );
21+ Path logPath = Paths .get (root .toString (), "logs" );
2022
2123 ExecutorService pool = Executors .newFixedThreadPool (16 );
2224
2325 while (true ) {
2426 Socket clientSocket = serverSocket .accept ();
2527 SocketHandler socketHandler = new SocketHandler (root ,
26- new FileLogger (root , new FileOperator ()),
28+ new FileLogger (logPath , new FileOperator ()),
2729 clientSocket .getInputStream (),
2830 clientSocket .getOutputStream ());
2931 pool .execute (socketHandler );
You can’t perform that action at this time.
0 commit comments