This project has moved. For the latest updates, please go here.

More WMI data and report log format

Feb 10, 2009 at 11:32 AM
I'd like to ask about format which you are planning to use in report log. If it will still be plain text I suggest it should be IMHO more descriptive and better human readable. If you are planning to use some interexchange format like XML it is perfectly ok to use MS internal numbers for types and statuses.

Another hint -- some useful information could be used also from WMI: Win32_Processor, Win32_ComputerSystemProduct and others.
Right now it is simple to add such information. I suppose it is enough to edit class SysInfoQueries and add two static SysInfoQuery:
        public static SysInfoQuery Processor = new SysInfoQuery("Processor", "Win32_Processor", true);
        public static SysInfoQuery ComputerProduct = new SysInfoQuery("Computer Product", "Win32_ComputerSystemProduct", true);

...and in class ExceptionReportGenerator modify private method CreateSysInfoResults() and add retrieval of new SysInfoQueries:
        private static IEnumerable<SysInfoResult> CreateSysInfoResults()
            var retriever = new SysInfoRetriever();
            var results = new List<SysInfoResult>
            return results;

Last note is about some data which IMHO should not be included in report log -- I have found at least one: property SerialNumber from Win32_OperatingSystem. I didn't see how such information could be useful for me as developer but I can imagine the questions from my users, why my application is sending such a sensitive information via email etc.

All this points (plain text log, more descriptions and translations of dates, numbers..., elimination of some data etc.) lead to my result and last question - maybe the querying should be more deterministics, exception trapper/logger should not ask for all data but only for specified properties and translate them into human readable format.

Thank you for you answer!
Feb 11, 2009 at 1:48 AM
Edited Feb 11, 2009 at 12:38 PM

Yeah, I suppose it might be useful if you had a JIRA-type bug reporting system that can parse the XML of incoming emails and log bugs automatically.

However, in the situations I've been using ExceptionReporter, I must admit, I wouldn't find XML output useful.
XML is going to be more verbose and potentially less human readable (infact you could argue almost certainly less readable)
Our audience is really only developers - so I haven't seen much of a need to make it prettier.

I just created the ExceptionReport class (previously just a 'string'), with the idea of encapsulating this better. If this class were 'capable' of outputting XML or RichText, that wouldn't be such a bad thing. I don't think I'm inspired to do this until the WPF version is finished, though.

Good point about the sensitive data, we should filter this out.