You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by Morten Andersen <mo...@vianett.no> on 2006/04/30 15:24:48 UTC
Problem when using generic classes
I have created a small app to illustrate the problem.
The output looks like this:
2006-04-30 15:19:09,799 [2924 ] [(null)] DEBUG
TestApplication.MyGenericClass`1[[TestApplication.MyClass,
TestApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
- Hello world
I was expecting something like this:
2006-04-30 15:19:09,799 [2924 ] [(null)] DEBUG
TestApplication.MyGenericClass<TestApplication.MyClass> - Hello world
=================
namespace TestApplication
{
class MyClass
{
static void Main()
{
MyGenericClass<MyClass> test = new MyGenericClass<MyClass>();
test.Test();
}
}
class MyGenericClass<T>
{
static readonly log4net.ILog log =
log4net.LogManager.GetLogger(typeof(MyGenericClass<T>));
public void Test()
{
log.Debug("Hello world");
}
}
}
=================
--
Best Regards
*Morten Andersen*
Developer
Vianett AS <http://www.vianett.no/> | morten@vianett.no
<ma...@vianett.no> | Office: +47 69 20 69 74
<callto://+4769206974> | Skype: mortander <callto://mortander>