Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log analytics, custom format, invalid log lines #3447

Closed
anonymous-matomo-user opened this issue Oct 16, 2012 · 1 comment
Closed

log analytics, custom format, invalid log lines #3447

anonymous-matomo-user opened this issue Oct 16, 2012 · 1 comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

My custom apache log format is:

LogFormat "%h \"%{%Y-%m-%d %H:%M:%S}t\" %v \"%U\" \"%q\" %<m %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost

I edited the file: piwik/misc/log-analytics/import_logs.py and added the follwing code:

_CUSTOM_LOG_FORMAT = (
'(?P<ip>[\d*.]*) "(?P<date>\d+[-\d+]+ [\d+:]+)" (?P<host>\S+) "(?P<path>.*?)" "(?P<query_string>.*?)" \w+ (?P<status>\d+) (?P<length>\S+) "(?P<referrer>.*?)" "(?P<user_agent>.*?)"'
)

and added the follwing to the Formats = {}:

'vhost': RegexFormat('vhost', _CUSTOM_LOG_FORMAT),

The script found "vhost" as the matching format but imports nothing.
Instead the logs import summary shows "xxx invalid log lines"

Where can be the mistake?

@mattab
Copy link
Member

mattab commented Oct 19, 2012

@waamee thanks for the report. please post your bug in the ticket: #3163

the script developer only reads the other ticket. thanks!

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12.x - Piwik 1.12.x milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants