Page 1 of 1

Is there "Grep" utilitys for .csl files

PostPosted: Tue Jan 09, 2018 3:32 am
by MikaK
Hi,
Just wondering if there exists grep like utilitys to search specific string from several .csl files
I have 40 files from which I'd like to search specific error messages regurally.

Re: Is there "Grep" utilitys for .csl files

PostPosted: Tue Jan 09, 2018 5:05 pm
by Raize Support
There is no dedicated tool for doing this, but there are some things that may help you get what you want. But that all depends on just what exactly you want to see for a match. For example, is it sufficient to simply know if a particular error occurs in a log file? Or, do you need to know all of the associated error details?

Let me explain. While the CodeSite Log file has a custom format. Most of the text elements are visible. Therefore, doing a grep on the CSL would tell you if an error is present. However, it would be hard to get any associated error information in this approach.

If you need to get at the error details, then you really need to get the log file into the File or Live Viewer. Then you would use the regular searching tools in the viewer to locate the errors. To handle the 40 or so files, you could use the CSMergeFiles program to combine multiple CodeSite log files into a single file, which could then be loaded into the viewer for searching.

It's definitely not ideal. What is really needed is a special tool for searching multiple CodeSite log files and displaying the message information. Something to consider for a future release.

Ray

Re: Is there "Grep" utilitys for .csl files

PostPosted: Wed Jan 10, 2018 3:45 am
by MikaK
I have grep that says line truncated ...
I just need to find what files contain error messages.
But thanks for idea, I just wrote a simple program to read *.csl and search it. It only output filenames where error exists

Re: Is there "Grep" utilitys for .csl files

PostPosted: Sat Jan 13, 2018 1:33 am
by Raize Support
Another option that I forgot to mention is to use the CSFileExporter command line tool to export the contents of a CSL file into a TXT, XML, or CSV file. Then you could use other file searching tools to search the exported text-based files.

Ray