로그파일생성 (1) 썸네일형 리스트형 [JAVA] 예외(Exception) - 로그파일 만들기 Exception 발생시 로그파일 생성 로그파일 생성 예제 import java.io.*; import java.util.*; class ExceptionEx { public static void main(String args[]) { PrintStream ps = null; FileOutputStream fos=null; try { fos = new FileOutputStream("error.log",true); // error.log파일에 출력 준비 ps=new PrintStream(fos); // err의 출력을 화면이 아닌, error.log파일로 변경 System.setErr(ps); System.out.println(1); System.out.println(2); System.out.print.. 이전 1 다음