delphimvcframework/samples/03_console_appender/LoggerProConfig.pas
Daniele Teti 55500acdf9 Squashed 'lib/loggerpro/' content from commit d1e0db6e
git-subtree-dir: lib/loggerpro
git-subtree-split: d1e0db6e93724e5fd825f0a8c02151d60450f98f
2023-02-27 12:26:25 +01:00

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.