Web/WAS/Apache
Apache Log 2개로 분리하기
은이종
2017. 8. 11. 14:31
Apache Log에서 특정 문자열만 별도로 분리할 경우가 생겨서
작업 진행해보았다.
httpd.conf 내에
SetEnvIfNoCase Request_URI "/download/temp/pdfexport" customlog2
SetEnvIfNoCase Request_URI "exportword" customlog2
CustomLog "|/app/apache/bin/rotatelogs -l /app/log/apache/export_%Y%m%d.log 86400" combined env=customlog2
설정 추가
access로그에
"/download/temp/pdfexport"
"exportword"
라는 문자열이 있는 Log는
export_날짜.log 형태로 분리시키는 설정