[fpc-devel] TCustomApplication.Log(?)

Michael Van Canneyt michael at freepascal.org
Tue Feb 16 17:45:12 CET 2010



On Tue, 16 Feb 2010, Joost van der Sluis wrote:

> On Tue, 2010-02-16 at 10:35 +0100, Martin Schreiber wrote:
>> On Monday 15 February 2010 21:45:33 Joost van der Sluis wrote:
>>
>>> I think option two is the best one. Then I can use the TEventLog for
>>> daemon and web applications. But I'm really interested in the opinion of
>>> the Lazarus and MseIDE people.
>>
>> What is the advantage to integrate log facility into tcustomapplication
>> instead to have log procedures and a log manager as a singleton in a separate
>> unit?
>
> Good question.
>
> I had to think about it again why I wanted this. And it is because I
> want to have a 'global' logging system available. But the application
> has to implement it.
>
> ie: I want to be able to log something in some fcl-units, without
> knowing what kind of application there's running.
> So that all applications can implement their own logging-system.
>
> But that's also possible with a new global instance of some class which
> can be overridden (and set) by applications. But that's a lot of work,
> so I think adding it to the TCustomApplication is a good idea. (?)

I second that. It's just a hook, after all.

Michael.



More information about the fpc-devel mailing list