Citrix StoreFront Log Viewer Tool

Have you ever had the need to debug StoreFront? I have on a couple of occasions and it wasn’t the easiest debugging exercise I’d ever undertaken unfortunately. Changing the logging level is easy enough with the PowerShell cmdlet Set-DSTraceLevel. For example, run the following on a StoreFront server to enable verbose logging (see

Add-PSSnapin Citrix.DeliveryServices.Framework.Commands

Set-DSTraceLevel –All –TraceLevel Verbose

Which will restart the Citrix services, having updated web.config files, and various log files will be created in “C:\Program Files\Citrix\Receiver StoreFront\Admin\trace”. It will also cause debug statements to be produced which can be picked up with tools like SysInternals dbgview.

The problem, in my experience, is that reading the log files, of which there are many, can be a bit of a chore. The log files are almost XML format but they are not fully compliant as they don’t have a top level node, since presumably adding this would have a performance hit. Even if you can get them into XML, working with them in XML isn’t particularly easy although that may depend on what XML tool you use (I would typically use Internet Explorer since that’s all I can rely on being on customer machines where I don’t want to start installing third party software).

Fortunately, PowerShell comes to our rescue (yet again) since it’s very easy in scripts to make this almost XML be properly formed so that this can then be quickly parsed and each log record output to a csv file or an on-screen grid view where filtering and/or searching can then take place.

The script is available here and can extract logs from multiple StoreFront servers, by accessing the logs via their C$ share, and splicing them together based on the time of each event. You can either specify a starting and ending date/time range via –start and –end respectively, specify –sinceBoot to include all entries since the last boot of each server or use –last with a number and a specifier such as ‘d’ for days, ‘m’ for minutes and ‘s’ for seconds so “-last 8h” means “in the last eight hours”. For example run the following to see all errors in the last two hours on the two specified StoreFront servers and display on-screen in a filterable grid view:

& '.\parse storefront log files.ps1' -computers storefront01,storefront02 -last 2h -subtypes error

If you have verbose logging enabled but only want to show warning and error entries then specify “-subtypes error,warning” since the default is to include all entries, including verbose ones.

Clicking “OK” at the bottom right of the grid view will copy any selected log lines into the clipboard, e.g. for web searches or logging with Citrix.

Specifying the -Verbose option gives information on what logs are being parsed, from which servers and for what time ranges.

Finally, don’t forget to change the StoreFront logging level back to something like “Error” rather than leaving it at “Verbose” as that is unlikely to help performance!

Author: guyrleech

I wrote my first program, in BASIC, in 1980, was a Unix developer after graduation from Manchester University (Computer Science) and then became a consultant, initially with Citrix WinFrame, in 1995 and later into Terminal Server/Services and thence EUC. I currently hold the Citrix CTP, Microsoft MVP, VMware vExpert and Parallels VIPP awards. I invented and wrote the first few versions of the security product which is now Ivanti Application Control (formerly AppSense Application Manager). I now work as an freelance consultant-cum-developer, live in West Yorkshire, England; have a wife, three children, one grandchild and two dogs and was a keen competitive runner until health problems put an end to that fun.

2 thoughts on “Citrix StoreFront Log Viewer Tool”

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: