digitalmars.D - Logger for D
- sybrandy (16/16) May 11 2010 Hello,
- novice2 (4/7) May 12 2010 thank you!
- sybrandy (8/15) May 12 2010 Got me. I think it's because I don't have any "releases" yet.
- strtr (3/27) May 12 2010 I'm pro a std.log (for D1 as well :)
- Andrei Alexandrescu (4/33) May 12 2010 Me too, but unfortunately the logger is using std.stream, which I think
- Graham Fawcett (16/49) May 12 2010 Comments like this make me nervous. :)
- Andrei Alexandrescu (6/60) May 12 2010 I understand. The word about std.stream has been out for a long time,
- Graham Fawcett (5/72) May 12 2010 Thank you. I'm fairly new here, and was not aware of the ongoing
- sybrandy (9/12) May 12 2010 Specifically, do you mean that I should be doing all my writes using a
- Don (4/62) May 13 2010 But there is a large number of modules scheduled for deprecation
- Masahiro Nakagawa (12/26) May 13 2010 I want two features.
- sybrandy (9/50) May 14 2010 Cool. I'll keep that in mind as I try to improve it. Currently, it
Hello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site. Enjoy! Casey
May 11 2010
sybrandy Wrote:https://launchpad.net/dloggerthank you! but why site says "DLogger does not have any download files." ?- If compiled with -version=nologger, it's like you never included it.may be it would be better -version=logger to compile with logger, and normal - without? what do you think? imho, compile with logger - not normal situation? i can be wrong of course...
May 12 2010
On 05/12/2010 11:57 AM, novice2 wrote:sybrandy Wrote:You're welcome!https://launchpad.net/dloggerthank you!but why site says "DLogger does not have any download files." ?Got me. I think it's because I don't have any "releases" yet.If that's the case, that's fine with me. It's not a huge change to the code. Based on recent experience, I prefer having a logger in unless I explicitly say I don't want it. It's great for debugging apps when you don't want to annoy your user with the details or if it's a server. Casey- If compiled with -version=nologger, it's like you never included it.may be it would be better -version=logger to compile with logger, and normal - without? what do you think? imho, compile with logger - not normal situation? i can be wrong of course...
May 12 2010
sybrandy Wrote:Hello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site. Enjoy! CaseyI'm pro a std.log (for D1 as well :) but shouldn't this be in .announce ?
May 12 2010
strtr wrote:sybrandy Wrote:Me too, but unfortunately the logger is using std.stream, which I think needs replacement. AndreiHello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site. Enjoy! CaseyI'm pro a std.log (for D1 as well :) but shouldn't this be in .announce ?
May 12 2010
Hi Andrei, On Wed, 12 May 2010 09:43:00 -0700, Andrei Alexandrescu wrote:strtr wrote:Comments like this make me nervous. :) How much of the stdlib do you think needs replacement? Which if any modules should be considered stable? Can D2 users expect that the stdlib in a year's time will look anything like it does now? Is there a formal development plan? I appreciate that D2 and its Phobos are works in progress. But I would hope that a statement like "std.stream needs replacement," coming from a core developer, would be followed up with either a replacement plan or a rationale and a call-to-arms. Noblesse oblige! Perhaps the D2 stdlib documentation should remind prominently that the stdlib isn't actually standardized yet, and that it should be treated as an experimental library. Best, Grahamsybrandy Wrote:Me too, but unfortunately the logger is using std.stream, which I think needs replacement.Hello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site. Enjoy! CaseyI'm pro a std.log (for D1 as well :) but shouldn't this be in .announce ?
May 12 2010
Graham Fawcett wrote:Hi Andrei, On Wed, 12 May 2010 09:43:00 -0700, Andrei Alexandrescu wrote:I understand. The word about std.stream has been out for a long time, and there is no similarly large overhaul planned to other parts of Phobos. For the logger interface, I think it's enough to use an output stream interface with only void put(in char[]) defined. Andreistrtr wrote:Comments like this make me nervous. :) How much of the stdlib do you think needs replacement? Which if any modules should be considered stable? Can D2 users expect that the stdlib in a year's time will look anything like it does now? Is there a formal development plan? I appreciate that D2 and its Phobos are works in progress. But I would hope that a statement like "std.stream needs replacement," coming from a core developer, would be followed up with either a replacement plan or a rationale and a call-to-arms. Noblesse oblige! Perhaps the D2 stdlib documentation should remind prominently that the stdlib isn't actually standardized yet, and that it should be treated as an experimental library. Best, Grahamsybrandy Wrote:Me too, but unfortunately the logger is using std.stream, which I think needs replacement.Hello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site. Enjoy! CaseyI'm pro a std.log (for D1 as well :) but shouldn't this be in .announce ?
May 12 2010
On Wed, 12 May 2010 13:22:28 -0700, Andrei Alexandrescu wrote:Graham Fawcett wrote:Thank you. I'm fairly new here, and was not aware of the ongoing discussion about std.stream. Best, GrahamHi Andrei, On Wed, 12 May 2010 09:43:00 -0700, Andrei Alexandrescu wrote:I understand. The word about std.stream has been out for a long time, and there is no similarly large overhaul planned to other parts of Phobos.strtr wrote:Comments like this make me nervous. :) How much of the stdlib do you think needs replacement? Which if any modules should be considered stable? Can D2 users expect that the stdlib in a year's time will look anything like it does now? Is there a formal development plan? I appreciate that D2 and its Phobos are works in progress. But I would hope that a statement like "std.stream needs replacement," coming from a core developer, would be followed up with either a replacement plan or a rationale and a call-to-arms. Noblesse oblige! Perhaps the D2 stdlib documentation should remind prominently that the stdlib isn't actually standardized yet, and that it should be treated as an experimental library. Best, Grahamsybrandy Wrote:Me too, but unfortunately the logger is using std.stream, which I think needs replacement.Hello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site. Enjoy! CaseyI'm pro a std.log (for D1 as well :) but shouldn't this be in .announce ?For the logger interface, I think it's enough to use an output stream interface with only void put(in char[]) defined. Andrei
May 12 2010
For the logger interface, I think it's enough to use an output stream interface with only void put(in char[]) defined. AndreiSpecifically, do you mean that I should be doing all my writes using a wrapper around std.file? I just want to make sure that I do it right this time. I went with std.stream as I felt that buffered output would minimize the performance impact of writing out the file system and since it was there...well... Regardless, if that is the case, then that's fine. If I'm missing something, I'd like to know before I go down the wrong road again. Thanks. Casey
May 12 2010
Andrei Alexandrescu wrote:Graham Fawcett wrote:But there is a large number of modules scheduled for deprecation (std.boxer, for example). I really like the idea of having a STATUS statement displayed at the top of the docs for every module.Hi Andrei, On Wed, 12 May 2010 09:43:00 -0700, Andrei Alexandrescu wrote:I understand. The word about std.stream has been out for a long time, and there is no similarly large overhaul planned to other parts of Phobos.strtr wrote:Comments like this make me nervous. :) How much of the stdlib do you think needs replacement? Which if any modules should be considered stable? Can D2 users expect that the stdlib in a year's time will look anything like it does now? Is there a formal development plan? I appreciate that D2 and its Phobos are works in progress. But I would hope that a statement like "std.stream needs replacement," coming from a core developer, would be followed up with either a replacement plan or a rationale and a call-to-arms. Noblesse oblige! Perhaps the D2 stdlib documentation should remind prominently that the stdlib isn't actually standardized yet, and that it should be treated as an experimental library. Best, Grahamsybrandy Wrote:Me too, but unfortunately the logger is using std.stream, which I think needs replacement.Hello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site. Enjoy! CaseyI'm pro a std.log (for D1 as well :) but shouldn't this be in .announce ?
May 13 2010
Hi, On Wed, 12 May 2010 07:54:23 +0900, sybrandy <sybrandy gmail.com> wrote:Hello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site.I want two features. - file-size or time-based rotation Manual management is very bother. - filter I think message customization is useful(e.g. coloring for terminal). Some loggers support this functionality(Log4j, Boost.log, etc...). I once wrote a logger. My logger is here. http://www.bitbucket.org/repeatedly/scrap/src/tip/logger.d This logger supports above features(Rotation is file-size only). Hope this helps.
May 13 2010
On 05/13/2010 04:05 PM, Masahiro Nakagawa wrote:Hi, On Wed, 12 May 2010 07:54:23 +0900, sybrandy <sybrandy gmail.com> wrote:Cool. I'll keep that in mind as I try to improve it. Currently, it just overwrites the file every run, however my use case was programs that run til completion, so that was perfectly acceptable. Granted, I've been toying with some server code, but even then I don't have it running very long. I first need to focus on replacing std.stream for writing to the logfile. Thanks. CaseyHello, I just wanted to let everyone know that I created a simple logging library for D. I wrote it as I wanted to debug my programs without having to deal with standard output and have used it for several little coding adventures. https://launchpad.net/dlogger The main features are: - Supports trace, info, dbug (debug), error, and fatal log errors. - Logging levels can be changed while the program is running - Is thread safe (hopefully) - If compiled with -version=nologger, it's like you never included it. Besides satisfying my own needs, I felt that a logging library of some sort would be good for Phobos, hence why I'm making this available. Please report any issues/suggestions to the launchpad site.I want two features. - file-size or time-based rotation Manual management is very bother. - filter I think message customization is useful(e.g. coloring for terminal). Some loggers support this functionality(Log4j, Boost.log, etc...). I once wrote a logger. My logger is here. http://www.bitbucket.org/repeatedly/scrap/src/tip/logger.d This logger supports above features(Rotation is file-size only). Hope this helps.
May 14 2010