Gareth Buxton | 1 Apr 01:43

Re: Boost Logging library - first draft

Hi Jean Daniel

I also have been working on a logger and have been considering
proposing it for inclusion in boost.

I feel that a logger must be both simple and a natural extension
of the standard stream libraries. Essentially everything should
be a stream. A logger then is merely a facilitator for managing
streams of messages generated by a piece of software.

So if you want to send some of your logging output to a file you
might attach a std::fstream to the logger. If you want to sent your
output over a network you might attack a socket_stream to the logger.

So basically the logger manages the aggregation of various streams
of information.

In addition to this the logger must enable a certain amount of
control over these aggregate streams. Traditionally this is managed
by masking off one or more streams when their output is not desired.

The other form of control the logger would need to exert over the
data itself would be formatting information. Each logging event will
capture a definite amount of data at a given point in program execution.

This data would typically be time, date, message etc. The logger
should not format this data itself as that would be too restrictive on
the desired output. Rather the logger should be able to accept a
formatting object to do this job appropriately to the given task.

(Continue reading)

Daniel Walker | 1 Apr 02:13
Picon
Gravatar

Re: [mpl] has_template_xxx patch

On 3/31/07, Daniel Walker <daniel.j.walker <at> gmail.com> wrote:
> On 3/30/07, Guillaume Melquiond <guillaume.melquiond <at> ens-lyon.fr> wrote:
> >
> > I am not sure if it will help you though, as I don't know if you can afford to
> > protect the class you want to test (bar) into a dummy template (foo),
> > so that a
> > substitution happens. No template typedef...
>
> OK, I think I got it. The trick was getting the "dummy" template.
>

I think I just found a workaround for msvc as well. The workaround
relies on a bug I noticed while working on this involving member
templates with no required parameters (all the parameters have
defaults). I worked around this problem, and I'll have a comment in my
final patch describing it. Anyway, I think this bug can be used to
work around the issue of rejecting types with member templates that
have the correct name but incorrect number of arguments. The following
code works on msvc 8.0 and 7.1.

typedef char (&yes)[1];
typedef char (&no) [2];

typedef void substitute_tag;
template< template< class U, class V > class T >
struct binary_template_substitute {
   typedef substitute_tag type;
};

template<class T, class T0, class T1, class U = substitute_tag>
(Continue reading)

Jody Hagins | 1 Apr 02:22
Favicon

Re: Boost Logging library - first draft


I'd avise both of you to look at John Torjo's library, and read the
review comments.  John pulled the library, but it would benefit you
greatly to see what others thought, and more specifically what they want
in a boost logging library.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Hervé Brönnimann | 1 Apr 06:53
Picon

Re: [sorting] External Sorting

Just one suggestion:  Have you checked http://stxxl.sourceforge.net/ ?

On Mar 30, 2007, at 9:53 PM, Sam Schetterer wrote:

> Would there be any interest sorting functions that sort data that is
> written to disk? I know that it sounds somewhat useless, but if the  
> data on
> disk takes up 10gb, I know that no computer can load all of that  
> data at
> once, even with virtual memory. This type of sort is also useful for
> low-memory machines, like a roadside speedometer, where large
> amounts of data need to be sorted but cannot fit into memory.
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/ 
> listinfo.cgi/boost
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

JD | 1 Apr 10:22
Picon

Re: Boost Logging library - first draft

Richard Day wrote:
> I havent had a chance to look at your code or pantheios yet but I am 
> interested in your library.
> A boost library would be something to standardize on for larger projects.
> One facility I like to have however is the ability to output to the 
> debugger. Does yours do this or do you intend to add it ?

Output to the debugger? You mean pass some kind of message to the 
debugger? And what the debugger does with those messages, just print 
them? I didn't think about that actually. But I guess there is no 
standardized way to do this, it depends on the debugger you use, or 
worst your system. I'm not sure an eventual Boost.Logging library should 
deal with this, but at least let some space for a particular user to 
append a interface to the debugger easily. How can it be done and still 
retain the simplicity of the library?

> Its not always feasible to do this for performance reasons though so you 
> need to be able to toggle it off and on of course(Full screen games are 
> my biggest culprit there).
> I have a very simple library I wrote myself to allow this but it is 
> lacking some features as well.
> It seems everyone has their own homegrown solution to this.

I think this is why there is still no logging library integrated into 
boost. Everybody has his idea (and sometime his own library) and nobody 
is able to agree on the minimum specification and stick with it. That is 
why my proposal is to define a small set of specifications, the lowest 
common denominator. I'm reading the old threads on this subject and try 
to aggregate something.

(Continue reading)

JD | 1 Apr 10:52
Picon

Re: Boost Logging library - first draft


> Externally defined formatting objects are employed to manage
> the actual presentation.
> 
> I personally feel that macros should be avoided as much
> as possible. One argument for using macros is the ability
> to conditionally include or exclude the logging code at
> compile time.
> 
> However this view is usually a product of 'developer centric'
> thinking and misses the much more important 'user centric'
> aspects of logging. The fact is that there are an awful lot
> of reasons to add logging information to a piece of software
> other than debugging. It is often desirable to be able to
> monitor the ongoing state of any medium to large sized application
> so this activity is not solely for the benefit of the developer.
> 
> On top of this, the number of places in a piece of software
> where performance is critical is often quite low. For really
> critical sections of code then of course a compile time defined
> macro could be appropriate. However I feel that in the many
> cases logging should be considered an integral part of the
> software being developed and so to be available in the
> production hardened release.
> 

This has been briefly discussed in the past.

Caleb Epstein:
* Messages which won't be logged shouldn't even go through the
(Continue reading)

JD | 1 Apr 12:08
Picon

Re: Boost Logging library - first draft

Jody Hagins wrote:
> I'd avise both of you to look at John Torjo's library, and read the
> review comments.  John pulled the library, but it would benefit you
> greatly to see what others thought, and more specifically what they want
> in a boost logging library.
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
> 

Thanks Jody, we should definitely avoid starting from scratch again. The 
problem is that there is so many divergent propositions and ideas, and 
aggregate them won't be an easy task.

Here is a couple of ideas I have glanced from previous threads:

John Torjo had actually a similar point of view to mine. He was looking 
for simplicity. As we are talking to a wide range of users, the library 
should have almost no learning curve. Looking at the basic example in 
the tutorial should be enough to get the fundamental usage of it.
John had also in mind the possibility to disconnect module of 
application from the logger. For example, from a certain point in the 
code, the GUI logs would be discarded. He also wanted the library to be 
small, and I fully agree with this. A header file and that's it.
Not anyone agree with this, Vladimir Prus for example was expecting 
something more configurable. Pavel Vozenilek added: "Maybe it is 
possible to design a library which has (by default) this simple 
interface but allows very fine customization." That is why I'm trying to 
concentrate on the first part (design a library which has (by default) 
this simple interface) and then, a second part could be handled by other 
people interested in fine customization.
(Continue reading)

Shams | 1 Apr 15:23
Picon
Favicon

Re: Boost Logging library - first draft

Hi,

After looking forward to a Boost Logging library for a while, I have been 
playing with this idea.

This library http://channel.sourceforge.net/ which I believe the author is 
working towards
including in Boost could be used to help write the logging library? Why 
because it works both
acrosss local and remote machines and supports a asyncronous subscribing 
machenism.

Boost.Logging could use Boost.Channel (hopefully) to allow doing of 
something like below
somewhere along the lines of...

Boost.Logging Log;

// Some of these channels could be a built-in to Boost logging.

// add one channel at a time
Log.AddChannel(new SysLogOnLocal());
Log.AddChannel(new SysLogOnRemoteChannel("remote ip"));
Log.AddChannel(new SysLogLocalAndRemoteChannel(""remote ip");
Log.AddChannel(stdout);
Log.AddChannel(stderr);
Log.AddChannel(GuiWindow);

// add lots all together
Log.AddChannel(new LocalInfoChannel(), new LocalAndRemoteInfoChannel(), new 
(Continue reading)

missdeer | 1 Apr 15:04
Picon
Gravatar

Re: Boost Logging library - first draft

JD,你好!

	Almost every debugger could catch the message output by OutputDebugString(W) API in Windows box.

======= 2007-04-01 16:23:37 你在来信中写道:=======

>Richard Day wrote:
>> I havent had a chance to look at your code or pantheios yet but I am 
>> interested in your library.
>> A boost library would be something to standardize on for larger projects.
>> One facility I like to have however is the ability to output to the 
>> debugger. Does yours do this or do you intend to add it ?
>
>Output to the debugger? You mean pass some kind of message to the 
>debugger? And what the debugger does with those messages, just print 
>them? I didn't think about that actually. But I guess there is no 
>standardized way to do this, it depends on the debugger you use, or 
>worst your system. I'm not sure an eventual Boost.Logging library should 
>deal with this, but at least let some space for a particular user to 
>append a interface to the debugger easily. How can it be done and still 
>retain the simplicity of the library?
>
>> Its not always feasible to do this for performance reasons though so you 
>> need to be able to toggle it off and on of course(Full screen games are 
>> my biggest culprit there).
>> I have a very simple library I wrote myself to allow this but it is 
>> lacking some features as well.
>> It seems everyone has their own homegrown solution to this.
>
>I think this is why there is still no logging library integrated into 
(Continue reading)

David Abrahams | 1 Apr 16:35
Picon
Picon
Favicon
Gravatar

1.34 - ONLY ONE FAILURE!


As of this morning, we're down to a single failure for 1.34, and
that's just a tester configuration issue.  Once Roland Schwartz
configures his cygwin python, that test (and all the Boost.Python
tests that have been marked expected failure on cygwin) will pass.

Just thought y'all would like to know.

--

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Don't Miss BoostCon 2007! ==> http://www.boostcon.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Gmane