delphimvcframework/lib/loggerpro/samples/03_console_appender/LoggerProConfig.pas

30 lines
348 B
ObjectPascal
Raw Normal View History

unit LoggerProConfig;
interface
uses
LoggerPro;
function Log: ILogWriter;
implementation
uses
LoggerPro.ConsoleAppender, Winapi.Windows;
var
_Log: ILogWriter;
function Log: ILogWriter;
begin
Result := _Log;
end;
initialization
_Log := BuildLogWriter([TLoggerProConsoleAppender.Create]);
if not IsConsole then
AllocConsole;
end.