Thursday, October 1, 2009

Exporting SharePoint Crawl Logs

To export SharePoint crawl logs, you have to either write a script or do some custom programming. Or install a very handy stsadm extension.
stsadm -o ExportCrawlLog
-t (d|s|c|p) -site <portal url> [-outfile filename] [-history] [-s startdatetime] [-e enddatetime] [-from #] [-thru #] [-cat (Portal_Content|ProfileImport)] [-csid #] [-msgid #] [-u url pattern] [-hostname hostname] [-mt (s|w|e)]
where -t = type: d=details, s=summary, c=content sources and start addresses
where -mt = Message type to include in output (applies to -t d only, if -mt is used only one message type can be specified, when -mt is omitted all types are emitted): s=success, w=warnings, e=errors
where -csid = the # of the content source, which you can spy in the query string of the url of the Content Source edit page.

stsadm -o ExportCrawlLog -t d -site "" -history -outfile output.log -s "2007-10-30T15:10:26-05:00" -e "2007-11-01 11:00" -mt e
stsadm -o ExportCrawlLog -t s -site ""
stsadm -o ExportCrawlLog -t c -site ""
The crawl logs can then be exported. I found it easier for spotting issues.

No comments:

Post a Comment