자바 메소드명 추출
![[Java] 로그 생성 파일 경로 추출](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbb2E1i%2Fbtq2NqRpgyU%2Fci8jkb5MYVSHKxY4hF7bPK%2Fimg.png)
[Java] 로그 생성 파일 경로 추출
로그파일 생성시 클래스명과, 메소드명을 추출하는 방법입니다. public class GetPath { /// Fields /// Constructor public GetPath(){ System.out.println("Create Default Contructor"); } /// Method public static void main(String[] args) { String path = new GetPath().makePath(); System.out.println(path); } /** * 로그 생성시 [ClassName::MethodName]의 경로를 얻어온다. * @return */ private String makePath(){ StackTraceElement[] a = new Throwable..