Coder Social home page Coder Social logo

Unparsable line about dategrep HOT 6 CLOSED

mdom avatar mdom commented on June 6, 2024
Unparsable line

from dategrep.

Comments (6)

mdom avatar mdom commented on June 6, 2024

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.

3PO avatar 3PO commented on June 6, 2024

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.

mdom avatar mdom commented on June 6, 2024

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.

3PO avatar 3PO commented on June 6, 2024

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.

mdom avatar mdom commented on June 6, 2024

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.

3PO avatar 3PO commented on June 6, 2024

Thanks, no it works as expected. ;)

from dategrep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.