]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/icap/icap_log.cc
2 #include "AccessLogEntry.h"
3 #include "acl/FilledChecklist.h"
7 #include "log/CustomLog.h"
9 #include "log/Formats.h"
10 #include "SquidConfig.h"
12 int IcapLogfileStatus
= LOG_DISABLE
;
19 for (log
= Config
.Log
.icaplogs
; log
; log
= log
->next
) {
20 if (log
->type
== Log::Format::CLF_NONE
)
23 log
->logfile
= logfileOpen(log
->filename
, log
->bufferSize
, log
->fatal
);
25 IcapLogfileStatus
= LOG_ENABLE
;
34 for (log
= Config
.Log
.icaplogs
; log
; log
= log
->next
) {
36 logfileClose(log
->logfile
);
45 for (CustomLog
* log
= Config
.Log
.icaplogs
; log
; log
= log
->next
) {
47 logfileRotate(log
->logfile
);
52 void icapLogLog(AccessLogEntry::Pointer
&al
)
54 if (IcapLogfileStatus
== LOG_ENABLE
) {
55 ACLFilledChecklist
checklist(NULL
, al
->adapted_request
, NULL
);
57 checklist
.reply
= al
->reply
;
58 HTTPMSGLOCK(checklist
.reply
);
60 accessLogLogTo(Config
.Log
.icaplogs
, al
, &checklist
);