Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I review (a fast reading) Apache Module mod_log_config and can't figure out what is the apache2 default log format and where is defined it. Any idea?

Note that what is on

/etc/apache2/conf.d/other-vhosts-access-log

is not a default option but a global option.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

It is clearly stated in the documetation for the TransferLog statement:

This directive has exactly the same arguments and effect as the CustomLog directive, with the exception that it does not allow the log format to be specified explicitly or for conditional logging of requests. Instead, the log format is determined by the most recently specified LogFormat directive which does not define a nickname. Common Log Format is used if no other format has been specified.

Go on to the LogFormat statement:

Default: LogFormat "%h %l %u %t \"%r\" %>s %b"

So if a TransferLog statement is given without any LogFormat statement the output format is as described above.

If also the TransferLog statment is missing no access log is written.

share|improve this answer
    
Thanks, but still can't read anything about TransferLog default, I mean, are you saying that if no CustomLog is specified, the TransferLog directive is in charge even it is not specified? If that is the case, where do you read that? cos TransferLog hasn't a default section defined. Thanks again. –  gsc-frank Mar 4 '13 at 23:13
    
If no TransferLog is defined, it is not written. –  H.-Dirk Schmitt Mar 4 '13 at 23:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.