-
Notifications
You must be signed in to change notification settings - Fork 25
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 parser not finding matches #408
Comments
Thanks for the bug report. I'll look into this issue, but it might take a while. The quick fix to this is to pre-process your input log using some other text-processing tools, such as awk/sed/perl and then use synoptic on the simpler, post-processed, input log. For example, for the line "1 al_new: void" in your example input, the post-processed log would contain the line "new", which is the TYPE that you'd like synoptic to use (based on your "(?<TYPE=>new)" fragment). Synoptic can be used as a library, but this is not documented and is fairly involved. If you're interested, take a look at InvariMintSynoptic.java class in the InvariMint project, here: |
After spending some time tracing through your code, I realized (based on seeing how the log printing worked) that the issue was with my command. However, this is partly due to the documentation: Your wiki uses the example synoptic -r '^hello .+'. However, on Ubuntu 14.04, this is processed as three arguments (without double quotes): "-r", "'^hello", and ".+'". In my case, without the space, I was processing the regex I'm leaving this open because I still believe that there are two things that should be done: an update to the wiki, and fixing the hello example. |
I have a log that contains the line " 1 al_new: void" (without quotes). I am trying to parse this log with synoptic, with the option
-r '(?<TIME>)\\s*al_new:\\s*.+(?<TYPE=>new)'
to try to parse it. However, synoptic keeps telling me the line does not parse. When I put the "processed" output into a java file with regex(?:\\s*(\\S+)\\s*)\\s*al_new:\\s*.+
, it does parse!Moreover, the example on your wiki page does not work: it only processes
^hello
as a regex, ignoring everything after the space. It then complains that there is no TYPE or STATE assigned in the regex.Is it possible to fix this, or to write my own parser and use synoptic as a library?
The text was updated successfully, but these errors were encountered: