Thursday, January 04, 2007

Large logs with MOSS

I noticed recently that the log files on my MOSS server were getting very large. These log files are located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS

Each log file was about 500 MB in size, and there were about 20 of them. This was not good. When I looked at the logs I noticed that I was getting a lot of messages for the general category.

So I ran the following command to turn off logging for the general category:
stsadm -o setlogginglevel -category "general" -tracelevel none

Bingo! Log files back to normal size. Some day when I have more time on my hands I'll try to find out what the messages mean.

You can also modify the number of log files MOSS generates from Central Admin:
1. From Central Admin, click Operations Management in the left panel
2. Click Diagnostic Logging
3. Modify the number of trace logs and click OK (I've set my test environment to 5)