I have a Logging unit with a TLofFile class. In the main form (TFrmMain) I add Logging to uses. In the public part of TFrmMain = class(TForm) I put
public
Logging : TLogFile;
Within the main form I can use Logging directly, but if I create a new unit and want to use logging there too, I have to put the main form in the uses and then I can use logging using mainform.Logging.<some procedure>. So in all units I have to add the main form to uses to access Logging. That could certainly be done better.
How can I access the Logging created in the main form in the individual units without adding the main form to the uses? Or where can i create the logging object outzide the main form so all units can access it?