[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues with gb.logging Logger, cannot _free


On 13/4/24 12:29 am, T Lee Davidson wrote:
On 4/12/24 05:46, BB wrote:
Oh and by the way, I can't recall any reason why there would be a need to call _free. The output file should be closed automagically at the program exit.

(Unless there is more than one program using the same log file????

Hi Bruce,

I'm not trying to call _free directly. I am trying to free the resource, which was not properly instantiated, by setting it to Null (which calls _free automatically, correct?). A logger with an invalid output file is useless. So, if .Begin() fails, I would need to kill the logger and re-create it with a valid sink. But, it is like a ghost object. It can't be used and can't be destroyed.

BTW, you wrote that? Were you using an alias back then? ;-)


(I finally got around to tracking the beast's history down.)

No, it was authored by sebikul but I had a large hand in pushing what I thought ought to be the simplest interface to achieve the goals of the time. This included suggesting the optional parameters. I have had a look at the existing code today and it looks nothing at all like what he (and by inference I) wrote at that time.

So I have to shut up now as I cannot help or even understand how such a simple goal has become so $#^E&\


b



Follow-Ups:
Re: Issues with gb.logging Logger, cannot _freeT Lee Davidson <t.lee.davidson@xxxxxxxxx>
References:
Issues with gb.logging Logger, cannot _freeT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: Issues with gb.logging Logger, cannot _freeBB <adamnt42@xxxxxxxxx>
Re: Issues with gb.logging Logger, cannot _freeT Lee Davidson <t.lee.davidson@xxxxxxxxx>