mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-17 00:35:55 +01:00
30 lines
348 B
ObjectPascal
30 lines
348 B
ObjectPascal
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.
|