Re: Implementing std.log

2011-05-28 Thread Jonathan M Davis
On 2011-05-28 10:30, Jose Armando Garcia wrote: > The implementation and documentation for std.log is ready for viewing. > You can take a look at the doc at > http://jsancio.github.com/phobos/phobos/std_log.html. The source code > is at https://github.com/jsancio/phobos/blob/master/std/log.d. > >

Re: Implementing std.log

2011-05-28 Thread Daniel Gibson
Am 28.05.2011 20:19, schrieb Andrej Mitrovic: On 5/28/11, Daniel Gibson wrote: Am 28.05.2011 20:08, schrieb Andrej Mitrovic: Clever use of __FILE__ and __LINE__ to create unique instantiations of the every() template. :) does this belong in this thread? I was just commenting the implementa

Re: Implementing std.log

2011-05-28 Thread Andrej Mitrovic
On 5/28/11, Daniel Gibson wrote: > Am 28.05.2011 20:08, schrieb Andrej Mitrovic: >> Clever use of __FILE__ and __LINE__ to create unique instantiations of >> the every() template. :) > > does this belong in this thread? I was just commenting the implementation.

Re: Implementing std.log

2011-05-28 Thread Daniel Gibson
Am 28.05.2011 20:08, schrieb Andrej Mitrovic: Clever use of __FILE__ and __LINE__ to create unique instantiations of the every() template. :) does this belong in this thread? furthermore __FILE__ and __LINE__ isn't enough for every(...) ; every(...);

Re: Implementing std.log

2011-05-28 Thread Andrej Mitrovic
Clever use of __FILE__ and __LINE__ to create unique instantiations of the every() template. :)

Re: Implementing std.log

2011-05-28 Thread Jose Armando Garcia
The implementation and documentation for std.log is ready for viewing. You can take a look at the doc at http://jsancio.github.com/phobos/phobos/std_log.html. The source code is at https://github.com/jsancio/phobos/blob/master/std/log.d. I had to make some changes to druntime to get the thread id

Re: Implementing std.log

2011-05-24 Thread Johannes Pfau
Jose Armando Garcia wrote: >Just wanted to let everyone know that I am working on having a review >wordy std.log. I am almost done with the implementation. I am >currently working on improving the documentation. Is there a link that >describes the review process. I would like to get std.log as clos

Re: Implementing std.log

2011-05-24 Thread Jose Armando Garcia
Just wanted to let everyone know that I am working on having a review wordy std.log. I am almost done with the implementation. I am currently working on improving the documentation. Is there a link that describes the review process. I would like to get std.log as close to final to minimize the back

Re: Implementing std.log

2011-05-22 Thread so
On Sun, 22 May 2011 21:38:26 +0300, Lars T. Kyllingstad wrote: On Sun, 15 May 2011 17:15:38 +0200, Jacob Carlborg wrote: Why does the user have to manually initialize the library? Why not use a static constructor or lazy initialization? Actually I don't like it at all, that the logging li

Re: Implementing std.log

2011-05-22 Thread Lars T. Kyllingstad
On Sun, 15 May 2011 17:15:38 +0200, Jacob Carlborg wrote: > On 2011-05-14 19:04, Andrei Alexandrescu wrote: >> On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] >> >> I updated my std.log draft. Added a lot of features including formatted >> writing, delayed logging, and a variety of configurat

Re: Implementing std.log

2011-05-19 Thread Andrei Alexandrescu
On 5/19/11 2:56 AM, Jens Mueller wrote: Andrei Alexandrescu wrote: * The way I see a nice implementation would be (inspired from Jens' work) via a class that defines the client-level methods as final, and has 2-3 extension methods that do the work. That way there's no need for awkward extra name

Re: Implementing std.log

2011-05-19 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 5/18/11 8:00 AM, Jose Armando Garcia wrote: > >I also think that having competing logging module is a good thing. > >This process will result in a better module for phobos and as a result > >a better module for the user. > > Clearly there are advantages to competing

Re: Implementing std.log

2011-05-18 Thread Andrei Alexandrescu
On 5/18/11 8:00 AM, Jose Armando Garcia wrote: I also think that having competing logging module is a good thing. This process will result in a better module for phobos and as a result a better module for the user. Clearly there are advantages to competing proposals, but I have mixed feelings

Re: Implementing std.log

2011-05-18 Thread Jose Armando Garcia
This is a review of std.log. Overall, I really like the API exposed by this module because it allows efficient compile time and run time configuration. I have limited the review to the API and how the API affects the implementation. I will review the implementation once the API is close to final.

Re: Implementing std.log

2011-05-18 Thread Jose Armando Garcia
std.logging is still alive! After posting my first attempt at a logging module I went back and spent a lot of time on how I could improve the API. I would like to say that Andrei's std.log module had a great influence on the final outcome. There are some aspect of std.log's API that I really like.

Re: Implementing std.log

2011-05-18 Thread Jacob Carlborg
On 2011-05-17 22:15, Andrei Alexandrescu wrote: On 5/17/11 4:02 AM, Jacob Carlborg wrote: On 2011-05-16 02:05, Andrei Alexandrescu wrote: Thanks for your work. I think there's an important distinction to be made. There are two "API"s being discussed. One is the client interface and the other i

Re: Implementing std.log

2011-05-17 Thread Andrei Alexandrescu
On 5/17/11 4:02 AM, Jacob Carlborg wrote: On 2011-05-16 02:05, Andrei Alexandrescu wrote: Thanks for your work. I think there's an important distinction to be made. There are two "API"s being discussed. One is the client interface and the other is the extensibility interface. Jose looked into

Re: Implementing std.log

2011-05-17 Thread Jacob Carlborg
On 2011-05-16 02:05, Andrei Alexandrescu wrote: Thanks for your work. I think there's an important distinction to be made. There are two "API"s being discussed. One is the client interface and the other is the extensibility interface. Jose looked into both: he provided a client interface that h

Re: Implementing std.log

2011-05-17 Thread Jacob Carlborg
On 2011-05-16 01:27, Jonathan M Davis wrote: On 2011-05-15 16:01, Andrei Alexandrescu wrote: On 05/15/2011 10:26 AM, Jacob Carlborg wrote: On 2011-05-15 00:33, Andrei Alexandrescu wrote: On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: On 2011-05-14 1

Re: Implementing std.log

2011-05-17 Thread Jacob Carlborg
On 2011-05-16 01:04, Andrei Alexandrescu wrote: On 05/15/2011 10:22 AM, Jacob Carlborg wrote: On 2011-05-14 22:37, Andrei Alexandrescu wrote: I want to nail usability before extension. Extensibility can be provided via an indirection inside FileLogger (which should indeed receive a more appropr

Re: Implementing std.log

2011-05-16 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: > [snip] > > I updated my std.log draft. Added a lot of features including > formatted writing, delayed logging, and a variety of configuration > options. Replaced the redundant log.xyz with logXyz. The > implementation is

Re: Implementing std.log

2011-05-16 Thread Jonas Drewsen
On 14/05/11 19.04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implementat

Re: Implementing std.log

2011-05-15 Thread Andrei Alexandrescu
On 05/15/2011 02:54 PM, Jacob Carlborg wrote: On 2011-05-14 19:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced t

Re: Implementing std.log

2011-05-15 Thread Jonathan M Davis
On 2011-05-15 16:01, Andrei Alexandrescu wrote: > On 05/15/2011 10:26 AM, Jacob Carlborg wrote: > > On 2011-05-15 00:33, Andrei Alexandrescu wrote: > >> On 05/14/2011 05:17 PM, Jonathan M Davis wrote: > >>> On 2011-05-14 14:56, Michel Fortin wrote: > On 2011-05-14 17:31:30 -0400, Jonathan M Da

Re: Implementing std.log

2011-05-15 Thread Andrei Alexandrescu
On 05/15/2011 10:22 AM, Jacob Carlborg wrote: On 2011-05-14 22:37, Andrei Alexandrescu wrote: I want to nail usability before extension. Extensibility can be provided via an indirection inside FileLogger (which should indeed receive a more appropriate name). Andrei The obvious solution would

Re: Implementing std.log

2011-05-15 Thread Andrei Alexandrescu
On 05/15/2011 10:26 AM, Jacob Carlborg wrote: On 2011-05-15 00:33, Andrei Alexandrescu wrote: On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what

Re: Implementing std.log

2011-05-15 Thread Andrei Alexandrescu
On 05/15/2011 10:53 AM, Jens Mueller wrote: Andrei Alexandrescu wrote: On 05/14/2011 04:56 PM, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I don't think that

Re: Implementing std.log

2011-05-15 Thread Jacob Carlborg
On 2011-05-14 19:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implement

Re: Implementing std.log

2011-05-15 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 05/14/2011 04:56 PM, Michel Fortin wrote: > >On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: > > > >>So, I do think that knowing which thread is logging what could be very > >>important for some programs, but I don't think that separating the log > >>files > >>

Re: Implementing std.log

2011-05-15 Thread Robert Clipsham
On 15/05/2011 16:15, Jacob Carlborg wrote: On 2011-05-14 19:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the

Re: Implementing std.log

2011-05-15 Thread Jacob Carlborg
On 2011-05-15 00:33, Andrei Alexandrescu wrote: On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but

Re: Implementing std.log

2011-05-15 Thread Jacob Carlborg
On 2011-05-14 22:37, Andrei Alexandrescu wrote: On 05/14/2011 02:50 PM, Robert Clipsham wrote: On 14/05/2011 18:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging,

Re: Implementing std.log

2011-05-15 Thread Jacob Carlborg
On 2011-05-14 19:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implement

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 10:04, Andrei Alexandrescu wrote: > On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: > [snip] > > I updated my std.log draft. Added a lot of features including formatted > writing, delayed logging, and a variety of configuration options. > Replaced the redundant log.xyz with logXyz. The

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/14/11 7:13 PM, Brad Roberts wrote: On 5/14/2011 3:35 PM, Andrei Alexandrescu wrote: On 05/14/2011 04:56 PM, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/14/11 6:43 PM, Michel Fortin wrote: On 2011-05-14 18:35:32 -0400, Andrei Alexandrescu said: On 05/14/2011 04:56 PM, Michel Fortin wrote: I'll also question whether they should be written to files at all by default (as opposed to stdin and stderr). I'm aware initLogging's documentation sa

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/14/11 6:35 PM, Michel Fortin wrote: On 2011-05-14 13:04:54 -0400, Andrei Alexandrescu said: Documentation: http://d-programming-language.org/phobos-prerelease/std_log.html Source: https://github.com/andralex/phobos Feedback welcome. Shouldn't "everyMs" and "afterMs" accept any of co

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 16:35, Michel Fortin wrote: > On 2011-05-14 13:04:54 -0400, Andrei Alexandrescu > > said: > > Documentation: > > > > http://d-programming-language.org/phobos-prerelease/std_log.html > > > > Source: > > > > https://github.com/andralex/phobos > > > > Feedback welcome. > > Shouldn

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 15:33, Andrei Alexandrescu wrote: > On 05/14/2011 05:17 PM, Jonathan M Davis wrote: > > On 2011-05-14 14:56, Michel Fortin wrote: > >> On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: > >>> So, I do think that knowing which thread is logging what could be very > >>> important fo

Re: Implementing std.log

2011-05-14 Thread Brad Roberts
On 5/14/2011 3:35 PM, Andrei Alexandrescu wrote: > On 05/14/2011 04:56 PM, Michel Fortin wrote: >> On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: >> >>> So, I do think that knowing which thread is logging what could be very >>> important for some programs, but I don't think that separating t

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 06:36 PM, Michel Fortin wrote: On 2011-05-14 18:33:06 -0400, Andrei Alexandrescu said: On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: I'd even go further and question whether it makes sense to have info, warning, and errors be written

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 18:35:32 -0400, Andrei Alexandrescu said: On 05/14/2011 04:56 PM, Michel Fortin wrote: I'll also question whether they should be written to files at all by default (as opposed to stdin and stderr). I'm aware initLogging's documentation says: "If log­ging is ef­fected with­out ha

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 13:04:54 -0400, Andrei Alexandrescu said: Documentation: http://d-programming-language.org/phobos-prerelease/std_log.html Source: https://github.com/andralex/phobos Feedback welcome. Shouldn't "everyMs" and "afterMs" accept any of core.time's duration types instead of bein

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 18:33:06 -0400, Andrei Alexandrescu said: On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: I'd even go further and question whether it makes sense to have info, warning, and errors be written to separate files. I'd definitely vote for

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 04:56 PM, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I don't think that separating the log files is necessarily a good idea. If you did, you'd lo

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I don't think that separating the log files is

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 14:56, Michel Fortin wrote: > On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: > > So, I do think that knowing which thread is logging what could be very > > important for some programs, but I don't think that separating the log > > files is necessarily a good idea. If you did, y

Re: Implementing std.log

2011-05-14 Thread Andrej Mitrovic
Your post just went asian on me. http://i.imgur.com/solwD.png

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 14:50, Andrei Alexandrescu wrote: > On 05/14/2011 04:31 PM, Jonathan M Davis wrote: > > On 2011-05-14 12:36, Andrei Alexandrescu wrote: > >> On 05/14/2011 01:29 PM, dsimcha wrote: > >>> On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: > On 5/9/11 1:52 AM, Andrei Alexandrescu wrot

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I don't think that separating the log files is necessarily a good idea. If you did, you'd lose timing information (unless the time is at t

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 04:31 PM, Jonathan M Davis wrote: On 2011-05-14 12:36, Andrei Alexandrescu wrote: On 05/14/2011 01:29 PM, dsimcha wrote: On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features incl

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 12:36, Andrei Alexandrescu wrote: > On 05/14/2011 01:29 PM, dsimcha wrote: > > On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: > >> On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: > >> [snip] > >> > >> I updated my std.log draft. Added a lot of features including formatted > >> writin

Re: Implementing std.log

2011-05-14 Thread Robert Clipsham
On 14/05/2011 21:37, Andrei Alexandrescu wrote: On 05/14/2011 02:50 PM, Robert Clipsham wrote: On 14/05/2011 18:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging,

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 02:50 PM, Robert Clipsham wrote: On 14/05/2011 18:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced

Re: Implementing std.log

2011-05-14 Thread Robert Clipsham
On 14/05/2011 18:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implement

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 01:29 PM, dsimcha wrote: On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the red

Re: Implementing std.log

2011-05-14 Thread dsimcha
On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implemen

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implementation is getting close to reviewable form. D

Re: Implementing std.log

2011-05-12 Thread Jacob Carlborg
On 2011-05-12 05:38, Andrei Alexandrescu wrote: On 5/11/11 5:09 PM, Sean Kelly wrote: On May 11, 2011, at 11:38 AM, Jacob Carlborg wrote: On 2011-05-10 16:41, Andrei Alexandrescu wrote: On 5/10/11 3:22 AM, Jacob Carlborg wrote: Are you referring to core.runtime.Runtime.args? That is not comp

Re: Implementing std.log

2011-05-11 Thread Andrei Alexandrescu
On 5/11/11 5:09 PM, Sean Kelly wrote: On May 11, 2011, at 11:38 AM, Jacob Carlborg wrote: On 2011-05-10 16:41, Andrei Alexandrescu wrote: On 5/10/11 3:22 AM, Jacob Carlborg wrote: Are you referring to core.runtime.Runtime.args? That is not completely reliable because: * You can start a new p

Re: Implementing std.log

2011-05-11 Thread Sean Kelly
On May 11, 2011, at 11:38 AM, Jacob Carlborg wrote: > On 2011-05-10 16:41, Andrei Alexandrescu wrote: >> On 5/10/11 3:22 AM, Jacob Carlborg wrote: >>> Are you referring to core.runtime.Runtime.args? That is not completely >>> reliable because: >>> >>> * You can start a new process, with exec, and

Re: Implementing std.log

2011-05-11 Thread Jacob Carlborg
On 2011-05-10 16:41, Andrei Alexandrescu wrote: On 5/10/11 3:22 AM, Jacob Carlborg wrote: Are you referring to core.runtime.Runtime.args? That is not completely reliable because: * You can start a new process, with exec, and then pass in whatever you want as the first argument to the process.

Re: Implementing std.log

2011-05-11 Thread Andrei Alexandrescu
On 05/11/2011 09:15 AM, Andrei Alexandrescu wrote: On 05/11/2011 08:46 AM, dsimcha wrote: On 5/9/2011 2:52 AM, Andrei Alexandrescu wrote: As I mentioned I'd already decided I'll take a stab at implementing a logging module inspired in design from glog. I was tired of the endless discussions on

Re: Implementing std.log

2011-05-11 Thread Andrei Alexandrescu
On 05/11/2011 08:46 AM, dsimcha wrote: On 5/9/2011 2:52 AM, Andrei Alexandrescu wrote: As I mentioned I'd already decided I'll take a stab at implementing a logging module inspired in design from glog. I was tired of the endless discussions on what a logging API should look like. This ironically

Re: Implementing std.log

2011-05-11 Thread dsimcha
On 5/9/2011 2:52 AM, Andrei Alexandrescu wrote: As I mentioned I'd already decided I'll take a stab at implementing a logging module inspired in design from glog. I was tired of the endless discussions on what a logging API should look like. This ironically is leading now to an embarrassment of r

Re: Implementing std.log

2011-05-11 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 5/9/11 3:12 PM, Jens Mueller wrote: > >I think every() behaves strangely. Because the counter is per function. > >But it should be per logging statement. std.log differs here from glog > >and this seems incorrect to me. everyMs() has a similar problem. > > Actually,

Re: Implementing std.log

2011-05-10 Thread Andrei Alexandrescu
On 5/9/11 3:12 PM, Jens Mueller wrote: I think every() behaves strangely. Because the counter is per function. But it should be per logging statement. std.log differs here from glog and this seems incorrect to me. everyMs() has a similar problem. Actually, they behave correctly. The counters fo

Re: Implementing std.log

2011-05-10 Thread Jose Armando Garcia
Thanks! Will do. On Mon, May 9, 2011 at 4:11 PM, Walter Bright wrote: > On 5/7/2011 1:43 PM, Jose Armando Garcia wrote: >> >> My intent, and hopefully we will get there with your help, is to >> include this in Phobos for D2. > > Thanks for doing the hard work of designing and laying out an > impl

Re: Implementing std.log

2011-05-10 Thread Jacob Carlborg
On 2011-05-10 16:41, Andrei Alexandrescu wrote: On 5/10/11 3:22 AM, Jacob Carlborg wrote: On 2011-05-09 21:18, Andrei Alexandrescu wrote: On 5/9/11 1:48 PM, Jacob Carlborg wrote: On 2011-05-09 19:58, Andrei Alexandrescu wrote: On 5/9/11 12:24 PM, Jacob Carlborg wrote: I have a function that

Re: Implementing std.log

2011-05-10 Thread Andrei Alexandrescu
On 5/10/11 3:22 AM, Jacob Carlborg wrote: On 2011-05-09 21:18, Andrei Alexandrescu wrote: On 5/9/11 1:48 PM, Jacob Carlborg wrote: On 2011-05-09 19:58, Andrei Alexandrescu wrote: On 5/9/11 12:24 PM, Jacob Carlborg wrote: I have a function that gets the path of the current process: http://dso

Re: Implementing std.log

2011-05-10 Thread Jacob Carlborg
On 2011-05-09 21:18, Andrei Alexandrescu wrote: On 5/9/11 1:48 PM, Jacob Carlborg wrote: On 2011-05-09 19:58, Andrei Alexandrescu wrote: On 5/9/11 12:24 PM, Jacob Carlborg wrote: I have a function that gets the path of the current process: http://dsource.org/projects/tango/attachment/ticket/1

Re: Implementing std.log

2011-05-09 Thread Andrej Mitrovic
On 5/9/11, Andrei Alexandrescu wrote: > One possibility is to provide a nice2ugly template that transforms C# > format strings into % format strings, e.g. nice2ugly!"{1}:{2}" yields > the string constant "%1$s:%2$s". That is exactly what my echo function does. It replaces {} syntax with %$s synta

Re: Implementing std.log

2011-05-09 Thread Robert Clipsham
On 09/05/2011 20:47, Andrei Alexandrescu wrote: On 5/9/11 1:34 PM, Robert Clipsham wrote: That is A LOT nicer to look at. Please can we have this? :< I, too, prefer it a great deal to the prinf/scanf format, and it wouldn't be difficult to implement, but at this point we need to worry about co

Re: Implementing std.log

2011-05-09 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 5/7/11 3:43 PM, Jose Armando Garcia wrote: > >Hey folks, > > > >For the past couple of days I took the liberty of partially > >implementing a logging module for D. > [snip] > > Nice work. Also thanks for contacting me offline. > > As I mentioned I'd already decided

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 1:34 PM, Robert Clipsham wrote: On 09/05/2011 19:18, Andrej Mitrovic wrote: I'm not a big fan of that format syntax. It's just hard to look at and figure out what went wrong when things do go wrong. I'd prefer something like: https://gist.github.com/963027 But someone would have to i

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 1:48 PM, Jacob Carlborg wrote: On 2011-05-09 19:58, Andrei Alexandrescu wrote: On 5/9/11 12:24 PM, Jacob Carlborg wrote: I have a function that gets the path of the current process: http://dsource.org/projects/tango/attachment/ticket/1536/process.d This links to a file attached to a

Re: Implementing std.log

2011-05-09 Thread Walter Bright
On 5/7/2011 1:43 PM, Jose Armando Garcia wrote: My intent, and hopefully we will get there with your help, is to include this in Phobos for D2. Thanks for doing the hard work of designing and laying out an implementation. Please, though, posting the source code as a news group message is not v

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 1:33 PM, Robert Clipsham wrote: On 09/05/2011 19:30, Robert Clipsham wrote: The example looks great, exactly what I'd hope for in the way of a logging library. A few questions: * How do you disable logging at compile time? (and is it zero overhead?) * How do you define your own loggin

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 1:30 PM, Robert Clipsham wrote: On 09/05/2011 07:52, Andrei Alexandrescu wrote: On 5/7/11 3:43 PM, Jose Armando Garcia wrote: Hey folks, For the past couple of days I took the liberty of partially implementing a logging module for D. [snip] Nice work. Also thanks for contacting me

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 20:34, Robert Clipsham wrote: On 09/05/2011 19:18, Andrej Mitrovic wrote: I'm not a big fan of that format syntax. It's just hard to look at and figure out what went wrong when things do go wrong. I'd prefer something like: https://gist.github.com/963027 But someone would have to

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 19:58, Andrei Alexandrescu wrote: On 5/9/11 12:24 PM, Jacob Carlborg wrote: I have a function that gets the path of the current process: http://dsource.org/projects/tango/attachment/ticket/1536/process.d This links to a file attached to a Tango ticket but don't worry, I've writte

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 20:03, Sean Kelly wrote: On May 9, 2011, at 10:45 AM, Andrei Alexandrescu wrote: On 5/9/11 12:24 PM, Jacob Carlborg wrote: I assume the "initLogging" function needs the application command line because you want to have the name of the application? If that's the case, I don't like

Re: Implementing std.log

2011-05-09 Thread Robert Clipsham
On 09/05/2011 19:30, Robert Clipsham wrote: The example looks great, exactly what I'd hope for in the way of a logging library. A few questions: * How do you disable logging at compile time? (and is it zero overhead?) * How do you define your own logging backend? * Is it possible to change loggi

Re: Implementing std.log

2011-05-09 Thread Robert Clipsham
On 09/05/2011 19:18, Andrej Mitrovic wrote: I'm not a big fan of that format syntax. It's just hard to look at and figure out what went wrong when things do go wrong. I'd prefer something like: https://gist.github.com/963027 But someone would have to implement it, of course. I have my own littl

Re: Implementing std.log

2011-05-09 Thread Robert Clipsham
On 09/05/2011 07:52, Andrei Alexandrescu wrote: On 5/7/11 3:43 PM, Jose Armando Garcia wrote: Hey folks, For the past couple of days I took the liberty of partially implementing a logging module for D. [snip] Nice work. Also thanks for contacting me offline. As I mentioned I'd already decide

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 19:45, Andrei Alexandrescu wrote: On 5/9/11 12:24 PM, Jacob Carlborg wrote: I assume the "initLogging" function needs the application command line because you want to have the name of the application? If that's the case, I don't like that is handled via the application command line

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 19:34, Andrei Alexandrescu wrote: On 5/9/11 12:14 PM, Jacob Carlborg wrote: On 2011-05-09 17:49, Andrei Alexandrescu wrote: On 5/9/11 10:37 AM, Jacob Carlborg wrote: Isn't the name of the log file a little too verbose? Don't know if I'm missing something but this doesn't seem so

Re: Implementing std.log

2011-05-09 Thread Andrej Mitrovic
I'm not a big fan of that format syntax. It's just hard to look at and figure out what went wrong when things do go wrong. I'd prefer something like: https://gist.github.com/963027 But someone would have to implement it, of course. I have my own little echo() function which takes simple "{}" posi

Re: Implementing std.log

2011-05-09 Thread Sean Kelly
On May 9, 2011, at 10:45 AM, Andrei Alexandrescu wrote: > On 5/9/11 12:24 PM, Jacob Carlborg wrote: >> I assume the "initLogging" function needs the application command line >> because you want to have the name of the application? If that's the >> case, I don't like that is handled via the applica

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 12:24 PM, Jacob Carlborg wrote: I have a function that gets the path of the current process: http://dsource.org/projects/tango/attachment/ticket/1536/process.d This links to a file attached to a Tango ticket but don't worry, I've written the whole file myself and I intend to change th

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 12:24 PM, Jacob Carlborg wrote: I assume the "initLogging" function needs the application command line because you want to have the name of the application? If that's the case, I don't like that is handled via the application command line. I have a function that gets the path of the cur

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 12:14 PM, Jacob Carlborg wrote: On 2011-05-09 17:49, Andrei Alexandrescu wrote: On 5/9/11 10:37 AM, Jacob Carlborg wrote: Isn't the name of the log file a little too verbose? Don't know if I'm missing something but this doesn't seem so useful for long running application that use logg

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 12:10 PM, Jacob Carlborg wrote: On 2011-05-09 17:49, Andrei Alexandrescu wrote: On 5/9/11 10:37 AM, Jacob Carlborg wrote: Isn't the name of the log file a little too verbose? Don't know if I'm missing something but this doesn't seem so useful for long running application that use logg

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 08:52, Andrei Alexandrescu wrote: On 5/7/11 3:43 PM, Jose Armando Garcia wrote: Hey folks, For the past couple of days I took the liberty of partially implementing a logging module for D. [snip] Nice work. Also thanks for contacting me offline. As I mentioned I'd already decide

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 17:49, Andrei Alexandrescu wrote: On 5/9/11 10:37 AM, Jacob Carlborg wrote: Isn't the name of the log file a little too verbose? Don't know if I'm missing something but this doesn't seem so useful for long running application that use logging. As far as I know you usually have one

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 17:49, Andrei Alexandrescu wrote: On 5/9/11 10:37 AM, Jacob Carlborg wrote: Isn't the name of the log file a little too verbose? Don't know if I'm missing something but this doesn't seem so useful for long running application that use logging. As far as I know you usually have one

Re: Implementing std.log

2011-05-09 Thread Andrei Alexandrescu
On 5/9/11 10:37 AM, Jacob Carlborg wrote: Isn't the name of the log file a little too verbose? Don't know if I'm missing something but this doesn't seem so useful for long running application that use logging. As far as I know you usually have one log file per application and outputs the message

Re: Implementing std.log

2011-05-09 Thread Jacob Carlborg
On 2011-05-09 08:52, Andrei Alexandrescu wrote: On 5/7/11 3:43 PM, Jose Armando Garcia wrote: Hey folks, For the past couple of days I took the liberty of partially implementing a logging module for D. [snip] Nice work. Also thanks for contacting me offline. As I mentioned I'd already decide

Re: Implementing std.log

2011-05-08 Thread Andrei Alexandrescu
On 5/7/11 3:43 PM, Jose Armando Garcia wrote: Hey folks, For the past couple of days I took the liberty of partially implementing a logging module for D. [snip] Nice work. Also thanks for contacting me offline. As I mentioned I'd already decided I'll take a stab at implementing a logging mod

Re: Implementing std.log

2011-05-08 Thread Jonathan M Davis
On 2011-05-08 15:45, Michel Fortin wrote: > On 2011-05-08 18:24:12 -0400, Jonathan M Davis said: > >> On 5/8/2011 11:45 AM, Jose Armando Garcia wrote: > >>> I am not sure I follow. Writing to disk is slower than writing to > >>> memory so you want to hide some of the cost of logging by either > >>

  1   2   >