Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Huge logs


#1

Happy new year to all :slight_smile:

I recently started using further switches to create daily logs etc., but unfortunately I now am hunting a bug and have to do that based on an ‘old’ log from the times before - and that is a 1,37GB monster.
Trying to open that causes out of memory-error. Is there anything I can do to get that file opened?


#2

Hello Michael,

Happy new year for you, too :slight_smile:

You can use the SmartInspectSplit tool to split a log file into smaller pieces, say chunks of 50 or 100 mb. SmartInspectSplit is part of our SmartInspect Resource Kit (includes the source code and pre-compiled binaries). The memory usage of the Console for a log is several times the size of the related log file because the data cannot be handled as efficient in memory as in a log file. This explains why the Console cannot load your log file even if you have more than 2GB or 4GB of memory, for example.


#3

@MBaas:

I have huge logs too and had the memory issue on the console. This is how I solved my problem.

I have SmartInspect chop my logs into 100MB chunks with the following init string:

file(filename={0}, append=false, maxsize=100 MB, maxparts=0)

Whenever I am chasing a bug I simply sort my log folder by date/time and rename the files to 1.sil, 2.sil, 3.sil and so on.

When I run the SmartInspect join utility it makes it easy since you dont have these really long filenames to type in.

I can typically join 5 files together (500 MB) and get the console to load properly. I have 4GB RAM on my machine.

Hope this helps a little.


#4

[code]When I run the SmartInspect join utility it makes it easy since you
dont have these really long filenames to type in.

I can typically join 5 files together (500 MB) and get the console to
load properly. I have 4GB RAM on my machine.[/code]

There’s actually no need to use the SmartInspect join tool to join these log files manually. The Console can open more than one log file at the same time (by default, log entries are simply appended to the end of the log which has the same effect as using the SmartInspect join tool). You can either open them with the Open Log File dialog or simply drag+drop those log files from the Explorer into the Console.