- This topic has 10 replies, 3 voices, and was last updated 2020-08-16 at 1:32 am by Ray Konopka.
-
AuthorPosts
-
-
February 27, 2020 at 12:04 pm #1658
Hi all,
Recently received a lot (300+) CodeSite log files of about 1M each.
Now I need to find out if there are any warning messages in these files.
Opening these files one by one and searching for warning messages turns out a very tedious job.
Is there a quicker way to do this?
Kind regards,
Hans Brand -
February 28, 2020 at 1:59 am #1660
Hi Hans,
At first I was going to suggest the CSMergeFiles tool to combine all your logs into one (or a few) log files, but then I realized that the CSMergeFiles tools works by taking two log files and creating a merged log file. Combining 300+ log files would be nearly as tedious as loading each one into the viewer.
This gave me an idea–a new command line tool called CSSearchFiles where you specify a log filename or a wildcard along with what types of messages you are looking for (e.g. Warnings, Errors, Exceptions, Notes) and the tools rips through each of the log files that match the file mask and writes on the console any matches including the message number. Then load the corresponding log file into the viewer and select Search > Jump to Message and enter the message number from the output.
The tool is working, but I need to do a little bit more to polish it up. I’ll make the tool available in the next day or two. Here’s a screenshot of the current version.
Ray
- This reply was modified 4 years, 9 months ago by Ray Konopka.
-
February 28, 2020 at 5:15 am #1662
Hello Ray,
Thank you for picking this up so quickly.
Just a list with files containing any warning messages is actually already very helpful to me. Most of the files do not have any warnings in them. I’ll wait for your tool.
Greetings,
Hans -
February 29, 2020 at 6:17 am #1663
Ray,
That would be a very useful tool as I create CSL log files for different days and this would make it very easy to find messages within a whole collection of them.
regards
Dave.
-
March 2, 2020 at 2:07 am #1667
Hi,
The new CSSearchFiles command line tool is now available:
https://raize.com/wp-content/uploads/CSSearchFiles.zipThe usage information for CSSearchFiles is shown below. Running CSSearchFile.exe without any command line parameters will also display the usage information.
Remember that the message number displayed next to each match can be used to jump directly to that message while in the CodeSite Live Viewer or CodeSite File Viewer.
Ray
CodeSite Search Files 5.3.3 Copyright (c) 1998-2018 by Raize Software, Inc. All Rights Reserved. Usage: CSSearchFiles [-type:<MsgTypes>] [-text:<Text>] [-trim:<Columns>] <Files> MsgTypes: Search for specified message types (e.g. EX) N=Notes | W=Warnings | E=Errors | X=Exceptions Text: If search text includes spaces, wrap in double quotes Columns: Trim output to column width (e.g. 80) Files: Path to CodeSite file(s) to search (e.g. C:\Logs\*.csl) Examples: CSSearchFiles -type:EX *.csl Search for all Error and Exception messages in all CodeSite log files in the current directory CSSearchFiles -text:"Print Report" *.csl Search for all messages that contain "Print Report" in message text
-
March 2, 2020 at 3:08 pm #1683
Thanks Ray!
Your tool did exactly what I needed it to do! It found that only two *.csl files of the 300+ actually had a warning in it, using this single command:
CSSearchFiles.exe -type:W *feb25*.csl
CodeSite Search Files 5.3.3
Copyright (c) 1998-2018 by Raize Software, Inc. All Rights Reserved.LaserToolLog2020Feb25_1324_0056.csl
2054 Warning Timeout waiting for BQ_LOWLaserToolLog2020Feb25_1324_0138.csl
3915 Warning Timeout waiting for BQ_LOWGreetings, Hans Brand
-
March 2, 2020 at 9:13 pm #1685
Hi Hans,
I’m so glad to hear that the CSSearchFiles tool helped you locate what you were looking for more quickly. And thank you for bringing up your request on this forum. I love to hear how people are using (or would like to use) CodeSite. You never know when it may spark a new feature or supporting tool!
Ray
-
May 28, 2020 at 4:21 am #1893
Dear Ray,
I am still using the CSSearchFiles tool with much success, thanks.
I have one request, though.
Would it be possible to do recursive searches down into sub-directories?
I have gathered a lot of logging files into more than 60 sub-folders (different levels deep) and want to quickly see if any event ever occurred in any of these log files. By the way, all my log files have the .csl extension.Also noticed that the CSSearchFiles is not in the 5.3.4 distribution with C++ Builder?
Kind regards and stay healthy,
Hans Brand
-
June 21, 2020 at 3:31 am #1958
Hi Hans,
Yes, it would certainly be possible to add a -S option to support searching into sub-directories. Things are a little hectic right now, so I may not be able to get to it soon, but I’ve added it to our feature requests.
Thanks for letting me know about the deployment. The CSSearchFile.exe was included in the CodeSite Studio 5.3.4 release, but not for the Express Edition. We’ll consider including it in the future.
Ray
-
August 6, 2020 at 9:12 am #2111
Dear Ray,
Hope you are still in good health?
I would like to add another request for the CSSearchFile.exe program.
It would really help me when the “Date” and “Time Stamp” columns were included in the output.Kind regards,
Hans Brand -
August 16, 2020 at 1:32 am #2120
Hi Hans,
I’ll add that request to the enhancement list.Ray
-
-
AuthorPosts
- You must be logged in to reply to this topic.