Multiple Log Files Import


#1

Hi,

Can I use the python import script to import multiple logs by using a simple u_ex*.log in the command line instead of naming each one???

Thanks

Ed


(Matthieu Aubry) #2

Does it work for you when you try it?


#3

No, says file not found??


(Matthieu Aubry) #4

I think it depends on which shell you use, because this works for me:

$ ./misc/log-analytics/import_logs.py /var/log/apache2/access.log.4* --url=http://localhost/piwik-master/ --idsite=1


#5

Its a Windows platform and noramlly .log would work if I was listing a directory or something. Is there any regex or special delimiters that python needs to be able to us the '’?


#6

:S


(Matthieu Aubry) #7

I’m not sure about python, if you find something let please us know (or create a ticket if you don’t )


#8

After some googling and reaching deep into the depths of my dos days I was successful doing this using a for loop!

for %a in (*.log) DO C:\python27\python import_logs.py --url=http://stats.mysite.com %a