Implementing std.log

Jose Armando Garcia jsancio at gmail.com
Sun May 8 09:00:24 PDT 2011


Good point and I agree that most users don't care and just want it to
work... I'll change the API to reflect this.

On Sun, May 8, 2011 at 6:09 AM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
>> On Sat, May 7, 2011 at 11:03 PM, dsimcha <dsimcha at yahoo.com> wrote:
>> > Ok, there's clearly been some misunderstanding here.  My real point was,
>> > why do you need this threading at all?
>>
>> It's definitely overkill for a single threaded application, but for things
>> like the application I'm working on, which is multithreaded and already
>> uses message passing between threads, I think it would fit in quite
>> nicely. My question would be whether it's pluggable enough to allow the
>> simple case of a single threaded program that doesn't need message passing
>> to be implemented.
>
> Honestly, I would hope that whatever the logging did with threads would be
> entirely internal and invisible. At most, the logger should indicate which
> thread the log message came from. How it's thread safe should be invisible and
> irrelevant to anyone using the logger. Why should I care whether it's using
> message passing, shared variables, or whatever internally? Ideally, it
> wouldn't need to worry about threading at all, but I'm not sure how likely
> that is. I believe that writeln should be thread-safe, but I'm not sure that
> file stuff would be, and presumably the logger needs to be able to do both of
> those.
>
> - Jonathan M Davis
>


More information about the Digitalmars-d mailing list