<-
Apache > HTTP Server > Documentation > Version 2.4 > ���

����ġ ��� mod_log_config

������ ���:  en  |  fr  |  ja  |  ko  |  tr 

�� ������ �ֽ��� ������ �ƴմϴ�. �ֱٿ� ����� ������ ���� ������ �����ϼ���.
����:�������� ��û�� �α׿� ����Ѵ�
����:Base
����:log_config_module
�ҽ�����:mod_log_config.c

���

�� ����� Ŭ���̾�Ʈ�� ��û�� �α׿� �����Ӱ� ����Ѵ�. �ڽ��� ���ϴ� �������� �α׸� ����� �� �ְ�, �����̳� �ܺ� ���α׷��� ���� �α׸� ���� ���� �ִ�. ������ �α׸� ����ϸ� ��û�� ���ݿ� ���� ��û�� �α׿� �߰��ϰų� ������ �� �ִ�.

�� ����� ������ ���þ �����Ѵ�. TransferLog�� �α������� �����, LogFormat�� ���ϴ� ������ ���ϰ�, CustomLog�� �ѹ��� �α����ϰ� ������ ��� �����Ѵ�. TransferLog�� CustomLog ���þ ������ ����ϸ� ��û�� ���� ���Ͽ� ����� �� �ִ�.

���þ��

����

����

top

�α� ���� �����ϱ�

LogFormat�� CustomLog ���þ��� ���� �ƱԸ�Ʈ�� ���ڿ��̴�. �� ���ڿ��� ���� ��û�� �α����Ͽ� ����Ѵ�. ���ڿ����� �α����Ͽ� �״�� ����Ǵ� ���ڿ� ��ٲް� ���� ��Ÿ���� C�� "\n"�� "\t" ����ڸ� ����� �� �ִ�. �α����Ͽ� ����ǥ�� �齽������ ������ �տ� �ݵ�� �齽������ ������� �Ѵ�.

��û�� Ư¡�� ���� ���ڿ��� "%" ���þ ����Ͽ� ����Ѵ�. �� ���þ�� �α����Ͽ��� ������ ���� ����ȴ�.

���� ���ڿ� ����
%% �ۼ�Ʈ ��ȣ
%...a ���� IP-�ּ�
%...A (����) IP-�ּ�
%...B HTTP ����� ������ ���� ����Ʈ��.
%...b HTTP ����� ������ ���� ����Ʈ��. CLF ���İ� ���� ������ ������ ���� ��� 0 ��� '-'�� ���´�.
%...{Foobar}C ������ ������ ��û���� Foobar ��Ű�� ����.
%...D ��û�� ó���ϴµ� �ɸ� �ð� (����ũ���� ����).
%...{FOOBAR}e ȯ�溯�� FOOBAR�� ����
%...f ���ϸ�
%...h ���� ȣ��Ʈ
%...H ��û ��������
%...{Foobar}i ������ ������ ��û���� Foobar: ����� ����.
%...l (�ִٸ� identd�� ������) ���� �α��θ�. mod_ident�� �ְ� IdentityCheck�� On�� �ƴϸ� �����ȣ�� ����Ѵ�.
%...m ��û �޽��
%...{Foobar}n �ٸ� ����� ����� Foobar ��Ʈ(note) ����.
%...{Foobar}o ������ Foobar: ��� ����.
%...p ��û�� �����ϴ� ������ ���� ��Ʈ
%...P ��û�� �����ϴ� �ڽ��� ���μ��� ID.
%...{format}P ��û�� �����ϴ� �ڽ��� ���μ��� ID Ȥ�� ������ ID. format���� pid�� tid�� �����ϴ�.
%...q ���ǹ��ڿ� (���ǹ��ڿ��� �ִٸ� �տ� ?�� ���̰�, ���ٸ� �� ���ڿ�)
%...r ��û�� ù��° ��
%...s ����(status). ���� �����̷��ǵ� ��û�� ��� *����* ��û�� �����̴�. ���� ��û�� ���´� %...>s.
%...t common log format �ð� ����(ǥ�� ���� ����)�� �ð�
%...{format}t strftime(3) ���� format�� �ð�. (�����ð��� �� ����)
%...T ��û�� ó���ϴµ� �ɸ� �ð� (�� ����).
%...u ���� ����� (auth�� �����ϸ�, ����(%s)�� 401�� ��� �̻��� ���� ���� �� ����)
%...U ���ǹ��ڿ��� ������ ��û URL ���.
%...v ��û�� ������ ������ ���� ServerName.
%...V UseCanonicalName ������ ���� ������.
%...X ������ �������� ���� ����.
X = ������ ��ġ�� ���� ������ ��������.
+ = ������ �����Ŀ��� ������ ����ִ�(keep alive).
- = ������ ������ ������ ��������.

(����ġ 1.3 �Ĺ� �������� �� ���þ�� %...c������, �������� ssl %...{var}c ������ ���ļ� �����ߴ�.)

%...I ��û�� ����� ������ ���� ����Ʈ���� 0�� �� ����. �̸� ����Ϸ��� mod_logio�� �ʿ��ϴ�.
%...O ����� ������ �۽� ����Ʈ���� 0�� �� ����. �̸� ����Ϸ��� mod_logio�� �ʿ��ϴ�.

"..."���� (���� ���, "%h %u %r %s %b") �ƹ��͵� ���ų�, �׸��� ������ ������ ���´� (������ �������� ������ �ڸ��� "-"�� ����Ѵ�). ������ �տ� "!"�� ���̰ų� �Ⱥ��� HTTP �����ڵ� ������� �ۼ��Ѵ�. ���� ���, "%400,501{User-agent}i"�� 400 (Bad Request) ������ 501 (Not Implemented) �����϶��� User-agent:�� �α׿� �����, "%!200,304,302{Referer}i"�� �������� ���°� �ƴ� ��� ��û�� ���� Referer:�� �α׿� �����.

������ "<"�� ">"�� ���� �����̷��ǵ� ��û���� ���� ó�� ��û�� ������ ������ ��û�� ������ �����Ѵ�. �⺻������ %s, %U, %T, %D, %r�� ó�� ��û�� ����, ������ % ���þ�� ������ ��û�� ����. �׷��� %>s�� ��û�� ������ ����(status)�� ����ϰ�, %<u�� �������� ��ȣ���� �ʴ� �ڿ����� ���� ����̷��ǵ� ��쿡�� ó���� ������ ����ڸ� ����Ѵ�.

2.0.46 ������ httpd 2.0 ������ %...r, %...i, %...o�� ��� ���ڿ��� �״�� �ξ���. ������ Common Log Format�� �䱸������ ���������ؼ�����. ��, Ŭ���̾�Ʈ�� ����ڸ� �α׿� ������� �� �ֱ⶧���� �α������� �״�� �ٷ� ���� �����ؾ� �Ѵ�.

���Ȼ� ������ 2.0.46���� ����� �� ���� ���ڳ� �ٸ� Ư�����ڸ� \xhh�� ǥ���Ѵ�. ���⼭ hh�� �ش� ����Ʈ�� 16���� ǥ���� ��Ÿ����. �� ��Ģ�� ���ܴ� �齽������ �տ� ���̴� "�� \, �׸��� C��� ������ ���鹮�ڵ�(\n, \t ��)�̴�.

�Ϲ������� ���� ����ϴ� �α� ������ ������ ����.

Common Log Format (CLF)
"%h %l %u %t \"%r\" %>s %b"
����ȣ��Ʈ ������ ������ Common Log Format
"%v %h %l %u %t \"%r\" %>s %b"
NCSA extended/combined �α� ����
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
Referer �α� ����
"%{Referer}i -> %U"
Agent (������) �α� ����
"%{User-agent}i"

��û�� �����ϴ� ������ ���� ServerName�� Listen�� ���� %v�� %p�� ����Ѵ�. �α׺м� ���α׷��� ������ ��û�� �����ϴ� ȣ��Ʈ�� �˱����� ����ȣ��Ʈ ã�� �˰������� ���� �ʿ������ �̵� ���� UseCanonicalName ������ �����ϴ�.

top

���Ȼ� ������ ��

������ �����ϴ� ����ڿܿ� �ٸ� ����ڰ� �α������� �����ϴ� ���丮�� ���� ������ ������ �� ���ȿ� ������ ������� ���� �� ������ �����϶�.

top

BufferedLogs ���þ�

����:Buffer log entries in memory before writing to disk
����:
������:�ּ�������
����:Base
���:mod_log_config

Documentation not yet translated. Please see English version of document.

top

CustomLog ���þ�

����:�α����� �̸��� ������ �����Ѵ�
����:CustomLog file|pipe format|nickname [env=[!]environment-variable]
������:�ּ�������, ����ȣ��Ʈ
����:Base
���:mod_log_config

������ ��û�� �α׿� ���涧 CustomLog ���þ ����Ѵ�. �α� ������ �����ϰ�, ȯ�溯���� ����Ͽ� ��û�� Ư¡�� ���� ���������� �α׸� ���� ���� �ִ�.

�α׸� ����� ��Ҹ� �����ϴ� ù��° �ƱԸ�Ʈ���� ���� ���� �ϳ��� ����Ѵ�.

file
ServerRoot�� ������� ���ϸ�.
pipe
���������� "|"�ڿ� �α� ������ ǥ���Է����� ���� ���α׷� ��θ� ���´�.

����:

���α׷��� ����Ѵٸ� ���α׷��� �������� ������ ����� �������� ����ȴ�. ������ root�� �����Ѵٸ� ���α׷��� root�� �����ϹǷ� ���α׷��� �������� Ȯ���϶�.

����

���н��� �ƴ� �÷������� ���ϰ�θ� �Է��Ҷ� �÷����� �齽������ ����ϴ��� �ݵ�� �������� ����ؾ� �Ѵ�. �Ϲ������� �������Ͽ����� �׻� �������� ����ϴ� ���� ����.

�ι�° �ƱԸ�Ʈ�� �α����Ͽ� ����� ������ �����Ѵ�. ���� LogFormat���� ������ nickname�� ����ϰų� ���� �α� ���� ������ ������ format ���ڿ��� ����� �� �ִ�.

���� ���, ���� �� ���þ�� �Ȱ��� ���� �Ѵ�.

# ���� ��Ī�� ����� CustomLog
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog logs/access_log common

# ���� ���� ���ڿ��� ����� CustomLog
CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"

����° �ƱԸ�Ʈ�� ��� �Ǹ�, Ư�� ���� ȯ�溯�� ������ ���� ��û�� �α׿� ������� ���θ� �����Ѵ�. ��û�� ������ ȯ�溯���� ���ǵ��ִٸ� (Ȥ�� 'env=!name'�� ����� ��� ���ٸ�) ��û�� �α׿� ����Ѵ�.

mod_setenvif�� mod_rewrite ����� ����Ͽ� ��û���� ȯ�溯���� ������ �� �ִ�. ���� ���, ������ GIF �׸��� ���� ��� ��û�� �ּ��� �αװ� �ƴ� �ٸ� �α����Ͽ� ����Ϸ���,

SetEnvIf Request_URI \.gif$ gif-image
CustomLog gif-requests.log common env=gif-image
CustomLog nongif-requests.log common env=!gif-image

top

LogFormat ���þ�

����:�α����Ͽ� ����� ������ ����Ѵ�
����:LogFormat format|nickname [nickname]
�⺻��:LogFormat "%h %l %u %t \"%r\" %>s %b"
������:�ּ�������, ����ȣ��Ʈ
����:Base
���:mod_log_config

�� ���þ�� ���� �α������� ������ �����Ѵ�.

LogFormat ���þ�� �ΰ��� �������� ����Ѵ�. ù��° ������ �ƱԸ�Ʈ�� �Ѱ��� ����Ͽ� ���� TransferLog ���þ���� ����� �α� ������ �����Ѵ�. �� �ƱԸ�Ʈ�� ���� �α� ���� �����ϱ� ������ ������ format�� ���� ����ϰų�, ������ ������ LogFormat ���þ�� �̸� ������ (�α� ������ ��Ī�ϴ�) nickname�� ����� �� �ִ�.

LogFormat ���þ��� �ι�° ������ format�� nickname�� �����Ѵ�. �׷��� �ڿ��� ����ϴ� LogFormat�̳� CustomLog ���þ �ݺ��ؼ� ���� ���ڿ��� ��� �Է��ϴ� ��� nickname�� ����� �� �ִ�. ��Ī�� �����ϴ� LogFormat ���þ�� �� �ܿ��� �ƹ� ����� ���� �ʴ´�. ��, ��Ī���� �����ϸ�, ������ ������ �����ϰų� ������ �⺻������ ������ �ʴ´�. �׷��Ƿ� ������ ������ TransferLog ���þ ������ ���� �ʴ´�. ��, LogFormat�� ��Ī���� �ٸ� ��Ī�� ������ �� �ִ�. ��Ī �̸����� �ۼ�Ʈ ��ȣ(%)�� ����� �� ������ �����϶�.

����

LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common

top

TransferLog ���þ�

����:�α����� ��ġ�� �����Ѵ�
����:TransferLog file|pipe
������:�ּ�������, ����ȣ��Ʈ
����:Base
���:mod_log_config

�� ���þ�� CustomLog ���þ�� �ƱԸ�Ʈ�� ����� ���������, �α� ������ ���� �����ϰų� ��û�� ���ǿ� ���� �α׿� ���� �� ����. ��� ���� �ֱ� ����� (��Ī�� �������� ����) LogFormat ���þ ������ �α� ������ ����Ѵ�. �̸� ������ �������� �ʾҴٸ� Common Log Format�� ����Ѵ�.

����

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
TransferLog logs/access_log

������ ���:  en  |  fr  |  ja  |  ko  |  tr 

top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.