Skip to content

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelJustin committed Aug 27, 2016
2 parents 19c5b57 + 035b585 commit fe1fec5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/djLoggerFactory.pas
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ procedure RegisterFactory(const AFactory: ILoggerFactory);

CriticalSection.Enter;
try
if Assigned(LoggerFactory) then
if Assigned(LoggerFactory) and IsConsole then
begin
WriteLn(SLF4PTag + WarnOverwrite);
end;
Expand All @@ -75,8 +75,11 @@ class function TdjLoggerFactory.GetLogger(const AName: string): ILogger;
begin
if not Assigned(LoggerFactory) then
begin
WriteLn(SLF4PTag + NoLoggerFactoryAvailable);
WriteLn(SLF4PTag + UseNOPLogger);
if IsConsole then
begin
WriteLn(SLF4PTag + NoLoggerFactoryAvailable);
WriteLn(SLF4PTag + UseNOPLogger);
end;
RegisterFactory(TNOPLoggerFactory.Create);
end;

Expand Down

0 comments on commit fe1fec5

Please sign in to comment.