Discussion:
Garbled log date stamp
Veiko Kukk
2017-12-11 14:08:09 UTC
Permalink
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?
Leif Hedstrom
2017-12-18 03:35:48 UTC
Permalink
Some broken log tags were fixed fairly recently, which also is going into 7.1.2.Look at https://github.com/apache/trafficserver/pull/2943 <https://github.com/apache/trafficserver/pull/2943> and see if this is your issue?

— Leif
Post by Veiko Kukk
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?
Veiko Kukk
2017-12-18 09:36:58 UTC
Permalink
Hi Leif,

Thank you for the answer. Good to know, it's known bug.

Veiko
Post by Leif Hedstrom
Some broken log tags were fixed fairly recently, which also is going into
7.1.2.Look at https://github.com/apache/trafficserver/pull/2943 and see
if this is your issue?
— Leif
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?
Loading...