www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Time to move logger from experimental to std ?

reply Basile B. <b2.temp gmx.com> writes:
Hello, most of the changes made during the current year to the 
std.experimental.logger package are related to the cosmetic 
style. Isn't this a sign showing that the experimentation is 
achieved ?


Facts:
- There only 4 issues for logger - 
https://issues.dlang.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=phobos&f0=OP&f1=OP&f2=product&f3=component&f4=alias&f5=short_desc&f7=content&f8=CP&f9=CP&j1=OR&list_id=218035&o2=substring&o3=substring&o4=substring&o5=substring&o6=substring&o7=matches&query_format=advanced&short_desc=logger&short_desc_type=allwordssubstr&v2=logger&v3=logger&v4=logger&v5=logger&v6=logger&v7=%22logger%22
- The history, mostly style things: 
https://github.com/dlang/phobos/commits/master/std/experimental/logger
Nov 29 2017
next sibling parent Jack Stouffer <jack jackstouffer.com> writes:
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote:
 Hello, most of the changes made during the current year to the 
 std.experimental.logger package are related to the cosmetic 
 style. Isn't this a sign showing that the experimentation is 
 achieved ?


 Facts:
 - There only 4 issues for logger - 
 https://issues.dlang.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=phobos&f0=OP&f1=OP&f2=product&f3=component&f4=alias&f5=short_desc&f7=content&f8=CP&f9=CP&j1=OR&list_id=218035&o2=substring&o3=substring&o4=substring&o5=substring&o6=substring&o7=matches&query_format=advanced&short_desc=logger&short_desc_type=allwordssubstr&v2=logger&v3=logger&v4=logger&v5=logger&v6=logger&v7=%22logger%22
 - The history, mostly style things: 
 https://github.com/dlang/phobos/commits/master/std/experimental/logger
In the past Andrei remarked that he didn't want to move it from stdx until RCStr was in Phobos. That was a couple of years ago, so his opinion might have change by seeing the slow progress on the DIP1000 front.
Nov 29 2017
prev sibling next sibling parent notna <notna.remove.this ist-einmalig.de> writes:
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote:
 Hello, most of the changes made during the current year to the 
 std.experimental.logger package are related to the cosmetic 
 style. Isn't this a sign showing that the experimentation is 
 achieved ?

 [...]
+1
Nov 29 2017
prev sibling next sibling parent reply Nathan S. <no.public.email example.com> writes:
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote:
 - There only 4 issues for logger
Considering that one of those issues is that the logger outputs garbage when given a wstring or a dstring, I would not take this as an indication that it's time to "graduate" the logger from experimental.
Nov 29 2017
parent reply Robert burner Schadek <rburners gmail.com> writes:
On Wednesday, 29 November 2017 at 19:48:44 UTC, Nathan S. wrote:
 Considering that one of those issues is that the logger outputs 
 garbage when given a wstring or a dstring, I would not take 
 this as an indication that it's time to "graduate" the logger 
 from experimental.
That was fixed at dconf17 and merged a couple of days later.
Nov 30 2017
parent Nathan S. <no.public.email example.com> writes:
On Thursday, 30 November 2017 at 09:37:27 UTC, Robert burner 
Schadek wrote:
 On Wednesday, 29 November 2017 at 19:48:44 UTC, Nathan S. wrote:
 Considering that one of those issues is that the logger 
 outputs garbage when given a wstring or a dstring, I would not 
 take this as an indication that it's time to "graduate" the 
 logger from experimental.
That was fixed at dconf17 and merged a couple of days later.
Glad to hear that. It seems like the reason it might have fallen through the cracks is that the commit message referenced issue 15945 instead of 15954. https://github.com/dlang/phobos/commit/9e6759995a1502dbd92a05b4d0a8b662f1c6032b#diff-41bb8731b16e43f1b48e0d529c498fa9
Nov 30 2017
prev sibling next sibling parent reply Claude <no no.no> writes:
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote:
 Hello, most of the changes made during the current year to the 
 std.experimental.logger package are related to the cosmetic 
 style. Isn't this a sign showing that the experimentation is 
 achieved ?
I tried deriving FileLogger class to implement my own log fomatting. I overrided beginLogMsg, logMsgPart or finishLogMsg, but I could not do anything with it because the handle "file_" is private (so I cannot access it within the derived class). So I ended up rewriting my own FileLogger deriving directly from Logger and copying most of the Phobos version code, but that's not convenient. Did I miss anything?
Nov 29 2017
next sibling parent reply Basile B. <b2.temp gmx.com> writes:
On Wednesday, 29 November 2017 at 21:14:57 UTC, Claude wrote:
 On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote:
 Hello, most of the changes made during the current year to the 
 std.experimental.logger package are related to the cosmetic 
 style. Isn't this a sign showing that the experimentation is 
 achieved ?
I tried deriving FileLogger class to implement my own log fomatting. I overrided beginLogMsg, logMsgPart or finishLogMsg, but I could not do anything with it because the handle "file_" is private (so I cannot access it within the derived class). So I ended up rewriting my own FileLogger deriving directly from Logger and copying most of the Phobos version code, but that's not convenient. Did I miss anything?
Sorry but yes, i think so, the handle is indirectly accessible with "FileLogger.file.fileno".
Nov 30 2017
parent reply Claude <no no.no> writes:
On Thursday, 30 November 2017 at 09:39:20 UTC, Basile B. wrote:
 On Wednesday, 29 November 2017 at 21:14:57 UTC, Claude wrote:
 On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. 
 wrote:
 Did I miss anything?
Sorry but yes, i think so, the handle is indirectly accessible with "FileLogger.file.fileno".
Oops! Sorry for the noise...
Dec 01 2017
parent Basile B. <b2.temp gmx.com> writes:
On Friday, 1 December 2017 at 15:51:42 UTC, Claude wrote:
 On Thursday, 30 November 2017 at 09:39:20 UTC, Basile B. wrote:
 On Wednesday, 29 November 2017 at 21:14:57 UTC, Claude wrote:
 On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. 
 wrote:
 Did I miss anything?
Sorry but yes, i think so, the handle is indirectly accessible with "FileLogger.file.fileno".
Oops! Sorry for the noise...
Now on ~master, the filename and the File are even protected.
Dec 01 2017
prev sibling parent Robert burner Schadek <rburners gmail.com> writes:
On Wednesday, 29 November 2017 at 21:14:57 UTC, Claude wrote:
 ...
 Did I miss anything?
to write a bugzilla issue about it
Nov 30 2017
prev sibling parent reply Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Wednesday, November 29, 2017 14:32:54 Basile B. via Digitalmars-d wrote:
 Hello, most of the changes made during the current year to the
 std.experimental.logger package are related to the cosmetic
 style. Isn't this a sign showing that the experimentation is
 achieved ?


 Facts:
 - There only 4 issues for logger -
 https://issues.dlang.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW
 &bug_status=ASSIGNED&bug_status=REOPENED&component=phobos&f0=OP&f1=OP&f2=p
 roduct&f3=component&f4=alias&f5=short_desc&f7=content&f8=CP&f9=CP&j1=OR&li
 st_id=218035&o2=substring&o3=substring&o4=substring&o5=substring&o6=substr
 ing&o7=matches&query_format=advanced&short_desc=logger&short_desc_type=all
 wordssubstr&v2=logger&v3=logger&v4=logger&v5=logger&v6=logger&v7=%22logger
 %22 - The history, mostly style things:
 https://github.com/dlang/phobos/commits/master/std/experimental/logger
It was my understanding that there were still problems with its design that Robert wanted to fix, but I don't know where any of that stands. But certainly, I don't think that it makes sense to push forward with trying to get the logger out of experimental without his feedback. Personally, I would _really_ like to see https://issues.dlang.org/show_bug.cgi?id=8687 dealt with so that file and line number can be runtime arguments rather than compile time arguments so that you don't end up with a new template instantiation every time you log something. - Jonathan M Davis
Nov 29 2017
parent Robert burner Schadek <rburners gmail.com> writes:
On Wednesday, 29 November 2017 at 21:40:13 UTC, Jonathan M Davis 
wrote:
 It was my understanding that there were still problems with its 
 design that Robert wanted to fix, but I don't know where any of 
 that stands. But certainly, I don't think that it makes sense 
 to push forward with trying to get the logger out of 
 experimental without his feedback.
That is correct, I had the code nearly ready, but then didn't found time create the PR. Its a api change, but it would make the api safer to log into manually handled memory, and would reduce the gc pressure. I'll try to squeeze my schedule for time to get this going again.
Nov 30 2017