2013년 5월 16일 목요일

macbook 에서 apache httpd 로그 분할

apache httpd 의 로그 분할은 예전 부터 cronolog 를 사용해 왔었다. macbook 도 cronolog 를 사용 할 수 있을 거라는 생각에 cronolog 를 다운로드 받아서 configure 를 해 보니...

헉! gcc check 가 no !
설마 하는 생각에 which gcc 를 해 보니....헉! gcc 가 엄서!

서비스 할 것도 아니고 그냥 개인 테스트 용도로 사용할 것이기 때문에, 곧바로 rotatelogs 로 방향 선회.

다행히 rotatelogs 는 /usr/sbin/rotatelogs 에 존재를 하고 있다.

에러 로그와 접속 로그를 다음과 같이 설정하여 로그 분할 완료.


ErrorLog "|/usr/sbin/rotatelogs  /Users/dhkim/Sites/log/gboard/error.%Y%m%d 86400"
CustomLog "|/usr/sbin/rotatelogs /Users/dhkim/Sites/log/gboard/access.%Y%m%d 86400" combined

아파치 재시작 하니 로그 잘 남는다. ㅋㅋ

댓글 없음:

댓글 쓰기