Browse Source

* Fix bug ID #31750

git-svn-id: trunk@36705 -
michael 8 years ago
parent
commit
03267e3ba3

+ 8 - 1
packages/fcl-extra/src/unix/daemonapp.inc

@@ -188,14 +188,21 @@ function TDaemonController.ReportStatus: Boolean;
 
 
 Var
 Var
   S : String;
   S : String;
+  doLog : Boolean;
 
 
 begin
 begin
   S:='';
   S:='';
+  DoLog:=True;
   If Assigned(FDaemon) then
   If Assigned(FDaemon) then
     With FDaemon do
     With FDaemon do
+      begin
       S:=Format(SDaemonStatus,[Definition.DisplayName,
       S:=Format(SDaemonStatus,[Definition.DisplayName,
                                CurrentStatusNames[Status]]);
                                CurrentStatusNames[Status]]);
-  Application.Log(etInfo,S);
+      if Assigned(Definition) then
+        doLog:=Definition.LogStatusReport;
+      end;  
+  if DoLog then    
+    Application.Log(etInfo,S);
 end;
 end;
 
 
 { ---------------------------------------------------------------------
 { ---------------------------------------------------------------------

+ 1 - 2
packages/fcl-extra/src/win/daemonapp.inc

@@ -577,9 +577,7 @@ begin
     Exit;
     Exit;
     end;
     end;
   DD.LogStatusReport:=True;
   DD.LogStatusReport:=True;
-{$ifndef svcdebug}
   If DD.LogStatusReport then
   If DD.LogStatusReport then
-{$endif svcdebug}
     With FDaemon do
     With FDaemon do
       begin
       begin
       S:=Format(SDaemonStatus,[Definition.DisplayName, CurrentStatusNames[Status]]);
       S:=Format(SDaemonStatus,[Definition.DisplayName, CurrentStatusNames[Status]]);
@@ -619,6 +617,7 @@ end;
 
 
 Procedure SysInitDaemonApp;
 Procedure SysInitDaemonApp;
 
 
+
 begin
 begin
 end;
 end;