Hi!
log.DebugFormat("Hello {0}! Where is {1}?, "Morten");
I know that I am missing an argument. The problem here is that some of
my applications went down because of this.
--
Best Regards
Morten Andersen
Developer
Vianett AS | [EMAIL PROTECTED] | Office: +47 69 20 69 74 | Skype: mortander
Log4net doesn't have its own run-time parsing engine for the *Format
methods; it just calls through to String.Format. If the format string
and parameters you're generating aren't compatible with String.Format
then you'll get unexpected results. For example, this will not include
Morten in the
Today debug format looks something like this:
void DebugFormat(string input, params object[] args)
{
if (IsDebugEnabled)
{
log(string.Format(input, args));
}
}
Quick solution (but not very smart) :)
void DebugFormat(string input, params object[] args)
{
if (IsDebugEnabled)
{
try {