We have a logging class, that has a log method with params:
public void LogTrace(String message, params object[] parameters) { .. .. String.Format(message, Parameters); What would be the .NET convention/expectation for what it would do when LogTrace is called without params but using some formatting placeholders? e.g.
LogTrace("This is a {poorly written} log message"); or
LogTrace("This is {0} log message"); Specifically - would you expect this to throw an exception, or to just log the plain text as-is? In the first case it seems "nice" that it just logs plain text, but in the second case it probably indicates you actually forgot a parameter.
Conceptually, it seems like there are two different functions here, one to log plain text, and one that logs a formatted message. So perhaps there should be two separate methods?