Comments (6)
You can try the switch --multiline, which does not insist to correctly parse every line by itself. If dategrep finds a line that does not match its time formats, the line is just added to the last line that matched.
from dategrep.
I dont know, what i do wrong, but it doesnt work:
vdr01_64 ~ # ./dategrep-standalone-big.pl --multiline --start "12:00" --end "12:15" --format "%b %d %H:%M:%S" /log/messages
dategrep-standalone-big.pl: No date found in first line: [parse] Invalid date string
vdr01_64 ~ #
There are entries at at this time in my logfile:
.....
Feb 08 12:08:03 [vdr] epg2vdr: Processed channel 'S19.2E-1-1053-21104' - 'HSE24 HD' with 0 updates
Feb 08 12:08:03 [vdr] epg2vdr: Processed channel 'S19.2E-133-33-40' - 'HSE24' with 3 updates
Feb 08 12:08:03 [vdr] epg2vdr: Processed channel 'S19.2E-1-1007-4911' - 'ORF1 HD' with 1 updates
Feb 08 12:08:03 [vdr] epg2vdr: Processed channel 'S19.2E-1-1117-13001' - 'ORF1' with 1 updates
Feb 08 12:08:03 [vdr] epg2vdr: Processed channel 'S19.2E-133-17-19' - 'Junior' with 4 updates
.....
from dategrep.
Mhh, weird, works here for me with the same command line and input file. %b is the abbreviated month name according to the current locale. Do you maybe use a locale that does not abbreviate February to Feb? What's the ouput of locale(1)?
from dategrep.
vdr01_64 ~ # locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE=C
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
vdr01_64 ~ #
from dategrep.
Ah, i got it. Dategrep checks if the first line of your file contains a date string, which can fail under multiline. I fixed that in the latest commit and you can already download the new prebuild scripts with the modifications. I still have to fix the corresponding code in sort_iterator() but as long as you don't use --sort-files or --interleave, it should now work.
from dategrep.
Thanks, no it works as expected. ;)
from dategrep.
Related Issues (20)
- add --ignore-unparsable
- peek_line vs peek_entry
- Move iteratator functions from dategrep.pm to Iterator.pm
- build debian package for release HOT 1
- Fixed download URL gone HOT 8
- Drop Milla and use plain DZIL
- Microseconds in Apache error log HOT 2
- Evaluate Gzip::RandomAccess HOT 2
- Infinite loop HOT 30
- Invalid lines HOT 4
- standalone-big does not contain parent.pm HOT 1
- 0.55 HOT 2
- dategrep-standalone-big reports wrong version HOT 1
- New release HOT 6
- Fails with German locale HOT 4
- Add information to debian/changelog HOT 3
- Test suite started to fail in 2019 HOT 1
- Express "1 day ago" after replacing Date::Manip HOT 9
- dockerize dategrep and potentially distribute to hub.docker.com HOT 6
- Accurate to seconds HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dategrep.