log4j.propeties �̏�����
log4j �� Jakarta �̃��O�o�̓t���[�����[�N�ł��B���O�̏����ݒ���@�� property �t�@�C���̑�
XML �ł��w��\�ł��B�����ł́A property �t�@�C���̎w����@�ɂ��ĉ�����܂��B
���ʂ̃v���p�e�B�� key
Appendar �̎�ނɌW��炸�A���ʂ��Ďw�肪�K�v�� key ���ځB
key |
�l |
����,�� |
log4j.debug |
true �������� false |
Logging�̏�����������\�����邩�ǂ����̎w�� |
log4j.rootCategory |
DEBUG, INFO, WARN, ERROR, FATAL �̂����ꂩ |
root �J�e�S���̏o�̓��x���̐ݒ� |
log4j.category.�J�e�S���� |
DEBUG, INFO, WARN, ERROR, FATAL �̂����ꂩ |
�J�e�S�����̏o�̓��x���̐ݒ� |
log4j.appender.�J�e�S���� |
Appender �N���X�̎w�� |
org.apache.log4j.ConsoleAppender, org.apache.log4j.RollingFileAppender �� |
log4j.appender.�J�e�S����.layout |
���C�A�E�g���s���N���X�̎w�� |
org.apache.log4j.PatternLayout |
log4j.appender.�J�e�S����.layout.conversionPattern |
�o�̓t�H�[�}�b�g�̎w�� |
%m%n |
�o�̓t�H�[�}�b�g�̎w����@
layout.conversionPattern �Ŏw�肷��t�H�[�}�b�g�̏������B
�t�H�[�}�b�g |
���e |
%c |
�J�e�S���[�� |
%d |
���� |
%F |
�t�@�C���� |
%l |
�ʒu |
%L |
�s�ԍ� |
%m |
���b�Z�[�W |
%M |
���\�b�h�� |
%n |
���s |
%p |
�o�̓��x�� |
%r |
�A�v���P�[�V�����J�n����̌o�ߎ��ԁi�~���b�j |
ConsoleAppender
�W���o�͂ɏo�͂��� Appendar�B���ʕ����ȊO�͓��Ɏw�肵�܂���B
log4j.debug=false
# org.apache category
log4j.category.org.apache=INFO, APACHE
log4j.appender.APACHE=org.apache.log4j.ConsoleAppender
log4j.appender.APACHE.layout=org.apache.log4j.PatternLayout
log4j.appender.APACHE.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss.SSS} - %m%n
RollingFileAppender
�t�@�C�������[�������� backup ����� Appendar�B
�EFile ---- �ۑ�����t�@�C��
�EMaxFileSize ---- ���O�t�@�C���̍ő�T�C�Y
�EMaxBackupIndex ---- ���O�t�@�C���̃o�b�N�A�b�v�̐�
# com.fc2web.himtodo.test
log4j.category.com.fc2web.himtodo.test=DEBUG, TEST
log4j.appender.TEST=org.apache.log4j.RollingFileAppender
log4j.appender.TEST.File=C:/logs/test.log
log4j.appender.TEST.MaxFileSize=10MB
log4j.appender.TEST.MaxBackupIndex=50
log4j.appender.TEST.layout=org.apache.log4j.PatternLayout
log4j.appender.TEST.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss.SSS} [%p] - %m%n
DailyRollingFileAppender
���P�ʂ� backup ����� Appendar�B
�EFile ---- �ۑ�����t�@�C��
�EDatePattern ---- backup �t�@�C���� suffix
# com.fc2web.himtodo.test
log4j.category.com.fc2web.himtodo.test=DEBUG, TEST
log4j.appender.TEST=org.apache.log4j.DailyRollingFileAppender
log4j.appender.TEST.File=C:/logs/test.log
log4j.appender.TEST.DatePattern='.'yyyy-MM-dd
log4j.appender.TEST.layout=org.apache.log4j.PatternLayout
log4j.appender.TEST.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss.SSS} [%p] - %m%n
���ȑO�Ƀ��O�����������t�Ɣ�r���ē��t���i��ł����� test.log.yyyy-MM-dd �Ƀt�@�C����ޔ�����B
���ꂩ�� test.log �Ƀ��O���o�͂���Ƃ���������Ƃ�B
VM �̍ċN�������s���ƃ��O�����[�����Ȃ��ꍇ������̂ŗv����
JDBCAppender
JDBC �o�R�Ńf�[�^�x�[�X�Ƀ��O��lj����� Appendar�B�e�[�u���͎��O�ɕK�v�B
�EURL ---- JDBC URL
�Euser ---- �f�[�^�x�[�X�̃��[�U
�Epassword ---- �f�[�^�x�[�X�̃p�X���[�h
�Edriver ---- JDBC Driver
�EbufferSize ---- buffer �̐��������O�����܂�� DB �ɏ������ށB Default �� 1 (�s�x����)
# com.fc2web.himtodo.test
log4j.category.com.fc2web.himtodo.test=DEBUG, TEST
log4j.appender.TEST=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.TEST.URL=jdbc:oracle:thin:@127.0.0.1:1521:TEST
log4j.appender.TEST.user=test
log4j.appender.TEST.password=test
log4j.appender.TEST.driver=oracle.jdbc.driver.OracleDriver
log4j.appender.TEST.bufferSize=1
log4j.appender.TEST.layout=org.apache.log4j.PatternLayout
log4j.appender.TEST.layout.conversionPattern=
INSERT INTO LOG_TABLE VALUES ('%d{yyyy-MM-dd HH:mm:ss.SSS}', '%p', '%m' )
|
|