Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We have a closed-source commercial C++ application. Some of our logged error messages are in plain English like "ERROR: could not read file 'foo'". While others use a macro to print filename/line information like ""SplineReticulator.cpp(423): out of bounds". This is not an assert or a crash, the application recovers fine, but it's an error we want to log.

What is a good rule of thumb when plain-English error message is appropriate vs. a filename/line one? Or are filename/line type errors even appropriate for closed-source commercial software? We've heard the argument they are unprofessional looking, but they are handy for debugging.

share|improve this question
    
If you don't want to disclose file/line information, you can replace it by a GUID. File/line information is just a grep away and users can clearly identify these logs as debug data for maintainers. –  mouviciel Sep 11 '13 at 5:29

2 Answers 2

up vote 5 down vote accepted

If your application produces a log file, then put all your module name/line number stuff in there. The errors for the user should be in plain $usersLocalLanguage whenever possible. If you need the detailed info while trouble-shooting a client's problem, you can get the user to email the log file to you, and dissect that all you want.

If you don't have a log file, then you might want to have a dialogue box that has a simple error for the user, and then a "details" panel (closed, by default) where they can copy the tech details (with filename/line number) and paste into an email and send it to you.

share|improve this answer

Our guideline is that technical details are only logged at debug level. All other messages are for customer consumption and must be worded appropriately with a minimum of technical jargon.(mere humans must be able to understand. :-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.