개인 저장용 블로그

[WebLogic] DataFormat Patten 변경하기 본문

Oracle Fusion Middleware/WebLogic

[WebLogic] DataFormat Patten 변경하기

우엉잇 2022. 2. 23. 10:32

weblogic은 default DataFormat은 "yyyy. M. d a h'시' mm'분' ss,SSS'초' z" 이다. 

 

그렇기 때문에 WebLogic Log을 확인해보면 AM, PM으로 time이 출력된다. 

.
.
<2022. 2. 23 오전 9 38 29,459 KST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
<2022. 2. 23 오전 9 38 29,466 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>

 

24 hours Format으로 변경하기 위해선 "yyyy-MM-dd HH:mm:ss.SSSS z" 을 사용하면 된다. 

.
.
<2022-02-23 09:41:20.0502 KST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
<2022-02-23 09:41:20.0509 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>

 

설정 변경 방법은 WebLogic Console에서 변경하거나, JVM 옵션을 추가하여 변경 할 수 있다. 

# WebLogic Console 변경 

# JVM 옵션 

 -Dweblogic.log.DateFormatPattern="yyyy-MM-dd HH:mm:ss.SSSS z"