I want to write my own logger.
This is my logger manager:
public static class LoggerManager
{
public static void Error(string name)
{
}
}
I am calling Error(string name);
method as below:
public class Foo
{
public void Test()
{
LoggerManager.Error(this.GetType().FullName);
}
}
In this way, I am geting the caller class name in my method called Error
.
But I don't want to pass the name to error method every time. I want to make my logger (Or another logger methods: Info()
, Warn()
) method get the name by itself.
Thanks for your best practice...