delphimvcframework/samples/03_console_appender/LoggerProConfig.pas
Daniele Teti 88cb06e717 Squashed 'lib/loggerpro/' changes from 49891138..d490578b
d490578b Update README.md
0dedf956 Added ILogItemRenders

git-subtree-dir: lib/loggerpro
git-subtree-split: d490578b87872f7995c230f48e328e576d0e2ffe
2024-01-23 17:20:36 +01:00

34 lines
453 B
ObjectPascal

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