Background Image
응용개발
2015.06.03 22:45

JAVA SP 사용 시 로그 처리 방법

조회 수 8574 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

JAVA 사용 시 통상 메세지 처리는 System.out.println 또는 System.err.println 를 사용한다.

JAVA SP(Stored Procedure/Function)에서는 위 System.out.println에 의한 결과가 DB Server를 구동 시킨 콘솔릐 화면에 출력된다.

따라서 DB Server 구동 시 사용한 콘솔을 닫았다면 해당 메세지는 확인할 방법이 없다.

JAVA SP 사용 시 발생하는 로그는 $CUBRID/log/[db_name]_java.log에 기록된다. 

하지만 위에서 언급했듯이 System.out.println 과 같이 처리해서는 이 log 파일에 기록되지 않기 때문에 아래와 같이 Exception 발생시 throw 처리를 해줘야 위 log 파일에 기록하게 되어 발생 메시지를 확인할 수 있다.

  public static String getName( String id) throws Exception {

    try {

         ...

   

     } catch (Exception e) {

         throw new Exception(e.getMessage());

     }

}



  1. Weblogic 10.0 사용시 JDK 1.5를 사용한 JDBC 드라이버 사용시 주의사항.

    Date2012.02.22 Category응용개발 Bycubebridge Views51957
    Read More
  2. WHERE 조건에서 다중 컬럼 IN절 처리 최적화 방법 (cubrid + ibatis)

    Date2015.08.21 Category응용개발 By이상신 Views55133
    Read More
  3. PHP에서 prepared statement 사용하기

    Date2009.04.16 Category응용개발 ByPrototype Views21454
    Read More
  4. PHP에서 prepared statement 사용시 BIND 관련 팁

    Date2009.06.30 Category응용개발 ByPrototype Views14843
    Read More
  5. PHP에서 Prepared statement 사용시 NULL 값을 바인딩 하는 방법

    Date2009.11.27 Category응용개발 ByPrototype Views19722
    Read More
  6. PHP에 CUBRID 모듈 추가시 모듈이 로드되지 않는 문제에 대한 해결 방안 하나입니다

    Date2010.07.01 Category응용개발 By남재우 Views16557
    Read More
  7. PHP 프로그램을 작성할때 주의할 점

    Date2009.07.01 Category응용개발 ByPrototype Views13728
    Read More
  8. PHP 성능 최적화를 위한 고려 사항

    Date2009.07.01 Category응용개발 By웁쓰 Views17415
    Read More
  9. PHP PEAR extension 을 이용한 DB Time 추적

    Date2009.07.01 Category응용개발 By웁쓰 Views19182
    Read More
  10. PHP PEAR extension Cache-Lite 를 이용한 응용 프로그램 최적화

    Date2009.07.01 Category응용개발 By웁쓰 Views17044
    Read More
  11. ODBC 드라이버를 이용한 Prepare 사용하기.

    Date2009.06.16 Category응용개발 Byseongjoon Views19591
    Read More
  12. MySQL의 Blob타입을 CUBRID로 변환하기

    Date2009.11.18 Category응용개발 Bycubebridge Views18856
    Read More
  13. Java Data Type의 CUBRID Data Type으로의 변경 Tip

    Date2009.06.16 Category응용개발 Bycubebridge Views18032
    Read More
  14. JDBC 커넥션 스트링에 UTF-8 명시하는법

    Date2009.07.03 Category응용개발 ByPrototype Views19017
    Read More
  15. JDBC 사용시 SQL 로깅 - p6spy 사용

    Date2009.07.01 Category응용개발 By웁쓰 Views35999
    Read More
  16. JAVA SP를 통해 다른 데이터베이스 연결하는 경우 잊지 말자.

    Date2009.12.16 Category응용개발 By손승일 Views17975
    Read More
  17. JAVA SP 사용 시 로그 처리 방법

    Date2015.06.03 Category응용개발 By손승일 Views8574
    Read More
  18. CUBRID의 날짜형 타입을 java의 날짜형 타입에 할당할 때의 값 비교.

    Date2009.12.16 Category응용개발 Byseongjoon Views20420
    Read More
  19. CUBRID의 Statement pooling기능

    Date2009.11.06 Category응용개발 Bycubebridge Views16944
    Read More
  20. CUBRID와 Oracle에서의 ''(공백)의 차이 비교

    Date2010.10.01 Category응용개발 Bycubebridge Views28583
    Read More
Board Pagination Prev 1 2 3 Next
/ 3

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales