Re: std.experimental.logger: practical observations

2014-09-18 Thread Marco Leise via Digitalmars-d
Please see the review thread for some long comment on multi-threading issues with this design. -- Marco

Re: std.experimental.logger: practical observations

2014-09-16 Thread Cliff via Digitalmars-d
On Monday, 15 September 2014 at 22:47:57 UTC, Robert burner Schadek wrote: On Monday, 15 September 2014 at 22:39:55 UTC, David Nadlinger wrote: Issues like threading behavior and (a)synchronicity guarantees are part of the API, though, and need to be clarified as part of the std.logger design.

Re: std.experimental.logger: practical observations

2014-09-15 Thread Robert burner Schadek via Digitalmars-d
On Monday, 15 September 2014 at 22:39:55 UTC, David Nadlinger wrote: Issues like threading behavior and (a)synchronicity guarantees are part of the API, though, and need to be clarified as part of the std.logger design. the threading behavior has been clarified in the api docs. the (a)synchro

Re: std.experimental.logger: practical observations

2014-09-15 Thread Cliff via Digitalmars-d
On Monday, 15 September 2014 at 22:39:55 UTC, David Nadlinger wrote: On Monday, 15 September 2014 at 22:33:46 UTC, Robert burner Schadek wrote: and you can do all that with std.logger. again, the idea of std.logger is not to give you everything, because nobody knows what that even is, the idea

Re: std.experimental.logger: practical observations

2014-09-15 Thread David Nadlinger via Digitalmars-d
On Monday, 15 September 2014 at 22:33:46 UTC, Robert burner Schadek wrote: and you can do all that with std.logger. again, the idea of std.logger is not to give you everything, because nobody knows what that even is, the idea is to make it possible to do everything and have it understandable l

Re: std.experimental.logger: practical observations

2014-09-15 Thread Robert burner Schadek via Digitalmars-d
On Monday, 15 September 2014 at 19:16:27 UTC, Cliff wrote: and you can do all that with std.logger. again, the idea of std.logger is not to give you everything, because nobody knows what that even is, the idea is to make it possible to do everything and have it understandable later and use tr

Re: std.experimental.logger: practical observations

2014-09-15 Thread Cliff via Digitalmars-d
On Monday, 15 September 2014 at 18:24:07 UTC, Marco Leise wrote: Ah, so you avoid recursion issues by separating the calls to error() et altera from the actual process of writing to disk or sending via the network. Behind error() there would be a fixed implementation controlled by the author of

Re: std.experimental.logger: practical observations

2014-09-15 Thread Sean Kelly via Digitalmars-d
On Thursday, 11 September 2014 at 16:55:32 UTC, Marco Leise wrote: 3. Exceptions and loggin don't mix. Logging functions expect the file and line to be the one where the logging function is placed. When I work with C functions I tend to call them through a template that will check th

Re: std.experimental.logger: practical observations

2014-09-15 Thread Marco Leise via Digitalmars-d
Ah, so you avoid recursion issues by separating the calls to error() et altera from the actual process of writing to disk or sending via the network. Behind error() there would be a fixed implementation controlled by the author of the logging library that just appends the payloads to a list. Anoth

Re: std.experimental.logger: practical observations

2014-09-15 Thread Jeremy Powers via Digitalmars-d
On Sun, Sep 14, 2014 at 10:30 AM, Cliff via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > Loggers are not *necessarily* also debuggers. When used for post-mortem > analysis (the typical case), it is not generally important that log data > has been written by the time any given log method

Re: std.experimental.logger: practical observations

2014-09-14 Thread Cliff via Digitalmars-d
On Sunday, 14 September 2014 at 07:22:52 UTC, Marco Leise wrote: Am Sat, 13 Sep 2014 14:34:16 + schrieb "Robert burner Schadek" : On Friday, 12 September 2014 at 16:08:42 UTC, Marco Leise wrote: > > Remember that the stdlog is __gshared? Imagine we set the > LogLevel to off and while execu

Re: std.experimental.logger: practical observations

2014-09-14 Thread Marco Leise via Digitalmars-d
Am Sat, 13 Sep 2014 14:34:16 + schrieb "Robert burner Schadek" : > On Friday, 12 September 2014 at 16:08:42 UTC, Marco Leise wrote: > > > > Remember that the stdlog is __gshared? Imagine we set the > > LogLevel to off and while executing writeLogMsg ... > > > > * a different thread wants to lo

Re: std.experimental.logger: practical observations

2014-09-13 Thread Robert burner Schadek via Digitalmars-d
On Friday, 12 September 2014 at 16:08:42 UTC, Marco Leise wrote: Remember that the stdlog is __gshared? Imagine we set the LogLevel to off and while executing writeLogMsg ... * a different thread wants to log a warning to stdlog * a different thread wants to inspect/set the log level It is you

Re: std.experimental.logger: practical observations

2014-09-12 Thread Marco Leise via Digitalmars-d
Am Fri, 12 Sep 2014 09:46:18 + schrieb "Robert burner Schadek" : > On Thursday, 11 September 2014 at 22:10:01 UTC, Marco Leise wrote: > > Let me clarify. Here is some code from 2015: > > > > void main() > > { > > stdlog = new MyLogger(); > > // This call may overflow the stack if > >

Re: std.experimental.logger: practical observations

2014-09-12 Thread Robert burner Schadek via Digitalmars-d
On Thursday, 11 September 2014 at 22:10:01 UTC, Marco Leise wrote: Am Thu, 11 Sep 2014 21:32:44 + schrieb "Robert burner Schadek" : On Thursday, 11 September 2014 at 16:55:32 UTC, Marco Leise wrote: > 2. I noticed that as my logger implementation grew more > complex >and used function

Re: std.experimental.logger: practical observations

2014-09-11 Thread Marco Leise via Digitalmars-d
Am Thu, 11 Sep 2014 21:32:44 + schrieb "Robert burner Schadek" : > On Thursday, 11 September 2014 at 16:55:32 UTC, Marco Leise wrote: > > 2. I noticed that as my logger implementation grew more complex > >and used functionality from other modules I wrote, that if > >these used logging

Re: std.experimental.logger: practical observations

2014-09-11 Thread Robert burner Schadek via Digitalmars-d
On Thursday, 11 September 2014 at 16:55:32 UTC, Marco Leise wrote: So I've implemented my first logger based on the abstract logger class, (colorize stderr, convert strings to system locale for POSIX terminals and wstring on Windows consoles). 1. Yes, logging is slower than stderr.writeln("Hello

std.experimental.logger: practical observations

2014-09-11 Thread Marco Leise via Digitalmars-d
So I've implemented my first logger based on the abstract logger class, (colorize stderr, convert strings to system locale for POSIX terminals and wstring on Windows consoles). 1. Yes, logging is slower than stderr.writeln("Hello, world!"); It is a logging framework with timestamps, runtime