Veiko Kukk
2017-12-11 14:08:09 UTC
Hi
ATS 7.1.1.
I'm trying to get human readable timestamps with ascii log formats.
-- Squid Log Format.
squid = format {
Format = '%<cqtt> %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquc>
%<caun> %<phr>/%<pqsn> %<psct>'
}
test_url_include = filter.accept('cquc CONTAIN /testurl')
test_url_exclude = filter.reject('cquc CONTAIN /testurl')
-- Log only test requests
log.ascii {
Filename = 'test_url',
Format = squid,
Filters = { test_url_include }
}
-- Normal client usage, excluded test url
log.ascii {
Filename = 'access',
Format = squid,
Filters = { test_url_exclude }
}
# file test_url.log
test_url.log: data
When trying to open with less, less says file is binary.
less test_url.log
"test_url.log" may be a binary file. See it anyway?
With timestamp in cqtq this does not happen. Why?
ATS 7.1.1.
I'm trying to get human readable timestamps with ascii log formats.
-- Squid Log Format.
squid = format {
Format = '%<cqtt> %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquc>
%<caun> %<phr>/%<pqsn> %<psct>'
}
test_url_include = filter.accept('cquc CONTAIN /testurl')
test_url_exclude = filter.reject('cquc CONTAIN /testurl')
-- Log only test requests
log.ascii {
Filename = 'test_url',
Format = squid,
Filters = { test_url_include }
}
-- Normal client usage, excluded test url
log.ascii {
Filename = 'access',
Format = squid,
Filters = { test_url_exclude }
}
# file test_url.log
test_url.log: data
When trying to open with less, less says file is binary.
less test_url.log
"test_url.log" may be a binary file. See it anyway?
With timestamp in cqtq this does not happen. Why?