New answers tagged

0

Adding a parameter is not changing an algorithm. An example: Your complex algorithm is Quicksort. Usual call: Quicksort (array, size) As the caller I want to know for some reason in which order you created partitions. So I declare Class partition { int left; int right; int pivot; } I change the prototype to Quicksort (array, size, vector <partition> *...


0

The answer is, it depends. It depends on who is supposed to consume the string and what the conventions within the team are. If the string is a message to the end-user, then it it likely that the string needs to be translated. The actual message for the end-user will live in a translation file and in the code you will only have a key for locating that ...


1

Yes. The Syslog Protocol, RFC 5424, specifices eight severity levels: Numerical Severity Code 0 Emergency: system is unusable 1 Alert: action must be taken immediately 2 Critical: critical conditions 3 Error: error conditions 4 Warning: warning conditions ...


1

TL;DR Standardization often comes at the cost of less flexible tailoring, and logging is something where custom tailoring is often highly desirable. Secondly, relevant XKCD. My questions are, isn't there any global standard for setting the log levels? There's a general convention about what differentiates e.g. an error from a trace message. However,...


Top 50 recent answers are included