Customization of User Defined Logger

2015-07-19 Thread Suliman via Digitalmars-d-learn
When I try co compile next code: class MyCustomLogger : Logger { this(string newName, LogLevel lv) @safe { super(newName, lv); } override void writeLogMsg(ref LogEntry payload) { // log message in my custom way } } auto logger = new MyCustomLogger();

Re: Customization of User Defined Logger

2015-07-19 Thread Ali Çehreli via Digitalmars-d-learn
On 07/19/2015 06:02 AM, Suliman wrote: When I try co compile next code: class MyCustomLogger : Logger { this(string newName, LogLevel lv) @safe { super(newName, lv); According to (and despite :p) its documentation Logger's constructor takes just a LogLevel: