Garbled log date stamp

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Garbled log date stamp

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?


Reply | Threaded
Open this post in threaded view
|

Re: Garbled log date stamp

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


On Dec 11, 2017, at 7:08 AM, Veiko Kukk <[hidden email]> wrote:

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?



Reply | Threaded
Open this post in threaded view
|

Re: Garbled log date stamp

Veiko Kukk
Hi Leif,

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

Veiko


2017-12-18 5:35 GMT+02:00 Leif Hedstrom <[hidden email]>:
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


On Dec 11, 2017, at 7:08 AM, Veiko Kukk <[hidden email]> wrote:

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?