You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Brendan McMahan <mc...@turbogenomics.com> on 2001/01/31 19:28:03 UTC

Using Log4j in a Library

I'm using log4j in what is effectively a library -- code that is
called from lots of places (different applications and jvms), some of
which I don't write.  I am using log4j in the library, and
applications that I write properly configure log4j.  However, I would
like the library to be usable from code that is not log4j aware, and
in particular not have the "No appenders could be found ... " message
printed.

I would like to be able to either:

1) Turn off the printing of the no appender warning message for a
particular category.  This could easily be implemented by a method in
Category that sets emittedNoAppenderWarning to true.

2) (Possibly a better solution) Disable all logging from the library
by default, but enable logging if log4j is configured.  This can, I
believe, be accomplished by calling BasicConfigurator.disableAll() in
a static initialization block in each library class.  However, when
the log4j system is configured, BasicConfigurator.overrideAsNeeded()
must be called or the log4j.disableOverride property must be set.  I
would prefer to be able to only disable the Categories used in the
library.

It would be easier to solve this problem if one could determine if
any configuration has been done, that is, if there are any Appenders
attached to any Category.  It seems like this would be very easy to
keep track of by simply setting a boolean in the Hierarchy.  Then, I
would only call disableAll() in my libraries if no configuration had
been done -- if configuration had been done, I would assume I am
running in a log4j aware application, and that it will do appropriate
configuration.

I can think of several ways to solve this problem by extending
Category or otherwise writing new code, but it seems like a common
enough situation that there should be a way to do what I want with the
standard distribution.  What solutions am I missing?

Thanks,

	Brendan



Re: Using Log4j in a Library

Posted by Ceki Gülcü <cg...@urbanet.ch>.
At 17:21 31.01.2001 -0500, you wrote:
>On Wed, 31 Jan 2001, Ceki Gülcü wrote:
>
>> I don't see what a second form of disabling at the category level
>> would bring. I can't even imagine what it would *mean*.
>
>Here is some pseudo-code that hopefully shows what i mean by category
>level disabling:
>
>class Category{
>...
>  public
>  boolean isEnabledFor(Priority priority) {
>    if(disable >= priority.level) {
>      return false;
>    }else if( (this.weakDisabled && !hierarchy.hasBeenConfigured()){
>        return false;
>    }
>    return priority.isGreaterOrEqual(this.getChainedPriority());
>  }
>}
>
>The hierarchy.hasBeenConfigured() method would return true if any
>appenders are attached to any Categories in the Hierarchy (it would just
>check a boolean, set to true when an appender was added).  IMHO, this
>would be a useful function to have anyway.  I would simply set
>weakDisabled to true on the Categories in my library, so they would be
>disabled until some configuration was done on the Hierarchy.

OK I'm convinced. There will be a Hierarchy.hasBeenConfigured() in the next version. (This feature has been requested a number of times recently.)


>The advantage of this is that I don't have to touch the state of the whole
>hierarchy.  If I weakly disable the whole hierarchy and a user wants to
>use log4j but doesn't configure it she won't get the warning message (at
>least, this is how I was invisioning the semantics of weakly disabling the
>whole hierarchy).

Sorry, I don't see the point especially after reading your next solution quoted below. 

>> By the way, if your library resides in a package of its own, say
>> com.myCompany.MyLib, then all you have to is to set
>> com.myCompany.MyLib to some very high priority like FATAL. This should
>> work without any need to mess with BasicConfigurator.disableAll().
>> There is no need to introduce weak disabling either.
>>
>> You would write:
>>
>> package com.myCompany;
>>
>> public class MyLib {
>>
>>   static {
>>      Category.getInstance(MyLib).setPriority(Priority.FATAL);
>>   }
>>
>>   // rest of MyLib
>> }
>>
>> If the user is log4j aware, and she is also interested in log output
>> generated by MyLib, then she can set the priority of the
>> "com.myCompany.MyLib" category to the value of verbosity she desires.
>
>The problem I see with this (and maybe I am missing something), is that if
>she configures log4j from a configuration file in some main method, the
>configuration will quite likely be done before the initialization of my
>library classes.  So when com.myCompany.myLib is instatntiated, it will
>override the priority that the user wanted it to have.  Now, if I had a
>method in Hierarchy that let me determine if the Hierarchy had been
>configured, I could do
>
>   static {
>        Category cat = Category.getInstance(MyLib);
>        if(!cat.getHierarchy().hasBeenConfigured()){
>             cat.setPriority(Priority.FATAL);
>        }
>   }

Absolutely. Hence the requirement for hasBeenConfigured.  


>Minor confusion might arise if the user configured log4j after
>MyLib was instantiated and assumed that no priority had been set for the
>Category.  I would of course document the above behavior, but users might
>miss the point.

You can tell them that if they want to see logging output from your library then they should *always* set "com.myCompany.MyLib" to INHERITED or to an appropriate Priority. This is beginning to take shape. Ceki




Re: Using Log4j in a Library

Posted by Anders Kristensen <ak...@dynamicsoft.com>.
Brendan McMahan wrote:
> 
> On Wed, 31 Jan 2001, Ceki Gülcü wrote:
> 
> > I don't see what a second form of disabling at the category level
> > would bring. I can't even imagine what it would *mean*.
> 
> Here is some pseudo-code that hopefully shows what i mean by category
> level disabling:
> 
> class Category{
> ...
>   public
>   boolean isEnabledFor(Priority priority) {
>     if(disable >= priority.level) {
>       return false;
>     }else if( (this.weakDisabled && !hierarchy.hasBeenConfigured()){
>         return false;
>     }
>     return priority.isGreaterOrEqual(this.getChainedPriority());
>   }
> }
> 
> The hierarchy.hasBeenConfigured() method would return true if any
> appenders are attached to any Categories in the Hierarchy (it would just
> check a boolean, set to true when an appender was added).  IMHO, this
> would be a useful function to have anyway.  I would simply set
> weakDisabled to true on the Categories in my library, so they would be
> disabled until some configuration was done on the Hierarchy.
> 
> The advantage of this is that I don't have to touch the state of the whole
> hierarchy.  If I weakly disable the whole hierarchy and a user wants to
> use log4j but doesn't configure it she won't get the warning message (at
> least, this is how I was invisioning the semantics of weakly disabling the
> whole hierarchy).
> 
> > By the way, if your library resides in a package of its own, say
> > com.myCompany.MyLib, then all you have to is to set
> > com.myCompany.MyLib to some very high priority like FATAL. This should
> > work without any need to mess with BasicConfigurator.disableAll().
> > There is no need to introduce weak disabling either.
> >
> > You would write:
> >
> > package com.myCompany;
> >
> > public class MyLib {
> >
> >   static {
> >      Category.getInstance(MyLib).setPriority(Priority.FATAL);
> >   }
> >
> >   // rest of MyLib
> > }
> >
> > If the user is log4j aware, and she is also interested in log output
> > generated by MyLib, then she can set the priority of the
> > "com.myCompany.MyLib" category to the value of verbosity she desires.
> 
> The problem I see with this (and maybe I am missing something), is that if
> she configures log4j from a configuration file in some main method, the
> configuration will quite likely be done before the initialization of my
> library classes.  So when com.myCompany.myLib is instatntiated, it will
> override the priority that the user wanted it to have.  Now, if I had a
> method in Hierarchy that let me determine if the Hierarchy had been
> configured, I could do
> 
>    static {
>         Category cat = Category.getInstance(MyLib);
>         if(!cat.getHierarchy().hasBeenConfigured()){
>              cat.setPriority(Priority.FATAL);
>         }
>    }

You can figure this out yourself by checking whether any Categories
other than the root exist *or* whether the root category has any
appenders. I sent this code snippet one or two days ago.

Alternatively (talking about hacks) you could tell your log4j aware
users that if they're going to configure your library they should always
set the priority of some bogus, unused Category to some well-defined
value, e.g. set 

  log4j.category.com.turbogenomics.mylib.use-log4j=EMERG

and your lib would test this priority and know that the app is taking
care of configuration. 

Less ugly and much more starightforward they could also just be asked to
set a System property, e.g. -Dmylib.log4j=true, this can be done on the
cmd line or programmatically and in the former case avoids any issues
about whether your lib runs before or after the app.

> 
> Minor confusion might arise if the user configured log4j after
> MyLib was instantiated and assumed that no priority had been set for the
> Category.  I would of course document the above behavior, but users might
> miss the point.
> 
>         - Brendan
> 
> > Hey, look! No hands, no weak disabling. :-)
> >
> > >One thought on this, as something of a side note: What about providing an
> > >AdvancedCategory that extends Category and contains less frequently used
> > >methods -- stuff that is not necessary for every Category, but would be
> > >useful in enough cases to be worthy of inclusion in log4j.  Weak disabling
> > >would be one example, and I can think of others.  This might be a nice way
> > >to provide some extra features without requiring new users to sort through
> > >tons of methods to find the important ones.
> > >
> > >Back to the issue at hand: Having weak-disabling on a per-hierarchy basis
> > >would more closely parallel the current disabling mechanism, and would
> > >probably only require the addition of one or two methods to the Hierarchy
> > >class.
> >
> > Exactly. But as discussed above no new code is necessary. Would you concur? Ceki
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

--
Anders Kristensen

Re: Using Log4j in a Library

Posted by Brendan McMahan <mc...@turbogenomics.com>.
On Wed, 31 Jan 2001, Ceki Gülcü wrote:

> I don't see what a second form of disabling at the category level
> would bring. I can't even imagine what it would *mean*.

Here is some pseudo-code that hopefully shows what i mean by category
level disabling:

class Category{
...
  public
  boolean isEnabledFor(Priority priority) {
    if(disable >= priority.level) {
      return false;
    }else if( (this.weakDisabled && !hierarchy.hasBeenConfigured()){
	return false;
    }
    return priority.isGreaterOrEqual(this.getChainedPriority());
  }
}

The hierarchy.hasBeenConfigured() method would return true if any
appenders are attached to any Categories in the Hierarchy (it would just
check a boolean, set to true when an appender was added).  IMHO, this
would be a useful function to have anyway.  I would simply set
weakDisabled to true on the Categories in my library, so they would be
disabled until some configuration was done on the Hierarchy.

The advantage of this is that I don't have to touch the state of the whole
hierarchy.  If I weakly disable the whole hierarchy and a user wants to
use log4j but doesn't configure it she won't get the warning message (at
least, this is how I was invisioning the semantics of weakly disabling the
whole hierarchy).

> By the way, if your library resides in a package of its own, say
> com.myCompany.MyLib, then all you have to is to set
> com.myCompany.MyLib to some very high priority like FATAL. This should
> work without any need to mess with BasicConfigurator.disableAll().
> There is no need to introduce weak disabling either.
>
> You would write:
>
> package com.myCompany;
>
> public class MyLib {
>
>   static {
>      Category.getInstance(MyLib).setPriority(Priority.FATAL);
>   }
>
>   // rest of MyLib
> }
>
> If the user is log4j aware, and she is also interested in log output
> generated by MyLib, then she can set the priority of the
> "com.myCompany.MyLib" category to the value of verbosity she desires.

The problem I see with this (and maybe I am missing something), is that if
she configures log4j from a configuration file in some main method, the
configuration will quite likely be done before the initialization of my
library classes.  So when com.myCompany.myLib is instatntiated, it will
override the priority that the user wanted it to have.  Now, if I had a
method in Hierarchy that let me determine if the Hierarchy had been
configured, I could do

   static {
	Category cat = Category.getInstance(MyLib);
	if(!cat.getHierarchy().hasBeenConfigured()){
             cat.setPriority(Priority.FATAL);
        }
   }

Minor confusion might arise if the user configured log4j after
MyLib was instantiated and assumed that no priority had been set for the
Category.  I would of course document the above behavior, but users might
miss the point.

	- Brendan


> Hey, look! No hands, no weak disabling. :-)
>
> >One thought on this, as something of a side note: What about providing an
> >AdvancedCategory that extends Category and contains less frequently used
> >methods -- stuff that is not necessary for every Category, but would be
> >useful in enough cases to be worthy of inclusion in log4j.  Weak disabling
> >would be one example, and I can think of others.  This might be a nice way
> >to provide some extra features without requiring new users to sort through
> >tons of methods to find the important ones.
> >
> >Back to the issue at hand: Having weak-disabling on a per-hierarchy basis
> >would more closely parallel the current disabling mechanism, and would
> >probably only require the addition of one or two methods to the Hierarchy
> >class.
>
> Exactly. But as discussed above no new code is necessary. Would you concur? Ceki
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
>



Re: Using Log4j in a Library

Posted by Ceki Gülcü <cg...@urbanet.ch>.
Brendan,

I was of course referring to global (or hierarchy-wide) disabling. Global disabling is a simple but very important feature. All printing methods (e.g. debug, info, etc.) first check if log4j is disabled for the relevant *priority* (regardless od category) and if so exit immediately. This check involves an integer comparison which is very quick. 

If the first check succeeds then there is a comparison between the priority of the category and the priority of the call. This checks may involve a hierarchy walk which is a few orders of magnitude slower than integer comparison (depending on the length of the walk). 

At 15:50 31.01.2001 -0500, you wrote:

>Thanks for the quick reply, Ceki.
>
>I agree that some form of weak disabling is the best solution.  Questions
>that come to mind are:
>
>Is weak disabling best done on a per-category or per-hierarchy basis?  My
>first response is to say that it makes the most sense on a per-category
>basis, so for example I would only weak-disable the categories in my
>libraries.  This would certainly give the most flexibility.  On the other
>hand, it would also mean adding more methods to Category class, which
>already bosts quite a few methods.

I don't see what a second form of disabling at the category level would bring. I can't even imagine what it would *mean*. 

By the way, if your library resides in a package of its own, say com.myCompany.MyLib, then all you have to is to set com.myCompany.MyLib to some very high priority like FATAL. This should work without any need to mess with BasicConfigurator.disableAll(). There is no need to introduce weak disabling either. 

You would write:

package com.myCompany;

public class MyLib {
  
  static {
     Category.getInstance(MyLib).setPriority(Priority.FATAL);  
  }
   
  // rest of MyLib
}

If the user is log4j aware, and she is also interested in log output generated by MyLib, then she can set the priority of the "com.myCompany.MyLib" category to the value of verbosity she desires.

Hey, look! No hands, no weak disabling. :-)

>One thought on this, as something of a side note: What about providing an
>AdvancedCategory that extends Category and contains less frequently used
>methods -- stuff that is not necessary for every Category, but would be
>useful in enough cases to be worthy of inclusion in log4j.  Weak disabling
>would be one example, and I can think of others.  This might be a nice way
>to provide some extra features without requiring new users to sort through
>tons of methods to find the important ones.
>
>Back to the issue at hand: Having weak-disabling on a per-hierarchy basis
>would more closely parallel the current disabling mechanism, and would
>probably only require the addition of one or two methods to the Hierarchy
>class.

Exactly. But as discussed above no new code is necessary. Would you concur? Ceki




Re: Using Log4j in a Library

Posted by Brendan McMahan <mc...@turbogenomics.com>.
Thanks for the quick reply, Ceki.

I agree that some form of weak disabling is the best solution.  Questions
that come to mind are:

Is weak disabling best done on a per-category or per-hierarchy basis?  My
first response is to say that it makes the most sense on a per-category
basis, so for example I would only weak-disable the categories in my
libraries.  This would certainly give the most flexibility.  On the other
hand, it would also mean adding more methods to Category class, which
already bosts quite a few methods.

One thought on this, as something of a side note: What about providing an
AdvancedCategory that extends Category and contains less frequently used
methods -- stuff that is not necessary for every Category, but would be
useful in enough cases to be worthy of inclusion in log4j.  Weak disabling
would be one example, and I can think of others.  This might be a nice way
to provide some extra features without requiring new users to sort through
tons of methods to find the important ones.

Back to the issue at hand: Having weak-disabling on a per-hierarchy basis
would more closely parallel the current disabling mechanism, and would
probably only require the addition of one or two methods to the Hierarchy
class.

Adding weak disabling in any form would add a another level of complexity
to the system because there would be three mechanisms that control wether
a logging event is enabled or disabled: 1) priority 2) weak-disabling and
3) "strong" disabling.  It would be nice if, at least from the users point
of view, the two forms of disabling could be rolled together into a
uniform framework.  I haven't thought through a way to accomplish this,
though.


	- Brendan

A couple more comments below:



On Wed, 31 Jan 2001, Ceki Gülcü wrote:
>
> Brendan,
>
> The problem you describe is quite non-trivial but I really would like
> it satisfactorily solved for log4j version 1.1. The latest code
> already in our CVS rep allows the user to disable logging within a
> config file not just by calling BasicConfigurator.disable(whatever).
> The disable/disableOverride code has been moved to the Hierarchy
> class. It has been also cleaned up somewhat.
>
> Here is a table of possible events, where "lib" is your library. "User
> first" means that the user code accesses log4j (possibly configuring
> log4j) before the library. By "lib first" I mean that your library
> gets initialized and accesses log4j before the user's code.
>
> ------------+-------------+------------
>             |  user not   | user log4j
>             | log4j aware |   aware
> ------------+-------------+------------
> user first  |    N/A      |  case 1
> ------------+-------------+------------
> lib first   |   case 2    |  case 3
> ------------+-------------+------------
>
> The desired behavior is:
>
> Case 1: lib detects the user's log4j configuration and uses it without
> disrupting it.
>
> Case 2: lib "disables" log4j in order to avoid the dreaded "No
> appenders" message.
>
> Case 3: lib "disables" log4j but gets overridden when the user
> configures log4j.
>
> The main point is that from the library's point of view, case 2 and 3
> are indistinguishable. Case 3, is interesting because unless the user
> takes explicit overriding action, the "disable" call made by the
> library will well.. disable all logging! Not what you want.

Exactly, thanks for clarifying this point.  I should have included
something along the lines of your table in my original message.  I was
basically ignoring case 3, or at least assuming that if the user code was
log4j aware that the user would know to take explicit overriding action.
But this isn't necessarily a good assumption.

> It follows that we need to introduce a weak form of disabling that
> will get automatically overridden when the user configures log4j.

Right.

> There are other solutions around this problem.
>
> 1) We could simply remove the "No appenders" message. This has been
> discussed/suggested before. I think that it is important to give the
> new user some active feedback when she forgets to initialize log4j.

I agree, I think the warning is important in most cases.

> 2) The library adds a NullAppender to root category. This is really
> very easy to do and should have negligible impact on performance but
> it's definitely a hack.

I hadn't thought of this, I will probably use this solution for now.


> At 13:28 31.01.2001 -0500, you wrote:
> >I'm using log4j in what is effectively a library -- code that is
> >called from lots of places (different applications and jvms), some of
> >which I don't write.  I am using log4j in the library, and
> >applications that I write properly configure log4j.  However, I would
> >like the library to be usable from code that is not log4j aware, and
> >in particular not have the "No appenders could be found ... " message
> >printed.
> >
> >I would like to be able to either:
> >
> >1) Turn off the printing of the no appender warning message for a
> >particular category.  This could easily be implemented by a method in
> >Category that sets emittedNoAppenderWarning to true.
>
> You probably don't want to bother.
>
>
> >2) (Possibly a better solution) Disable all logging from the library
> >by default, but enable logging if log4j is configured.  This can, I
> >believe, be accomplished by calling BasicConfigurator.disableAll() in
> >a static initialization block in each library class.  However, when
> >the log4j system is configured, BasicConfigurator.overrideAsNeeded()
> >must be called or the log4j.disableOverride property must be set.  I
> >would prefer to be able to only disable the Categories used in the
> >library.
>
> Right.
>
>
> >It would be easier to solve this problem if one could determine if
> >any configuration has been done, that is, if there are any Appenders
> >attached to any Category.  It seems like this would be very easy to
> >keep track of by simply setting a boolean in the Hierarchy.  Then, I
> >would only call disableAll() in my libraries if no configuration had
> >been done -- if configuration had been done, I would assume I am
> >running in a log4j aware application, and that it will do appropriate
> >configuration.
> >
> >I can think of several ways to solve this problem by extending
> >Category or otherwise writing new code, but it seems like a common
> >enough situation that there should be a way to do what I want with the
> >standard distribution.  What solutions am I missing?
>
>
> Introducing weak disabling seems the most reasonable thing to do. Comments? Ceki
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
>


Re: Using Log4j in a Library

Posted by Ceki Gülcü <cg...@urbanet.ch>.
Brendan,

The problem you describe is quite non-trivial but I really would like it satisfactorily solved for log4j version 1.1. The latest code already in our CVS rep allows the user to disable logging within a config file not just by calling BasicConfigurator.disable(whatever). The disable/disableOverride code has been moved to the Hierarchy class. It has been also cleaned up somewhat.

Here is a table of possible events, where "lib" is your library. "User first" means that the user code accesses log4j (possibly configuring log4j) before the library. By "lib first" I mean that your library gets initialized and accesses log4j before the user's code.

------------+-------------+------------
            |  user not   | user log4j
            | log4j aware |   aware
------------+-------------+------------
user first  |    N/A      |  case 1
------------+-------------+------------
lib first   |   case 2    |  case 3
------------+-------------+------------

The desired behavior is:

Case 1: lib detects the user's log4j configuration and uses it without disrupting it. 

Case 2: lib "disables" log4j in order to avoid the dreaded "No appenders" message.

Case 3: lib "disables" log4j but gets overridden when the user configures log4j.

The main point is that from the library's point of view, case 2 and 3 are indistinguishable. Case 3, is interesting because unless the user takes explicit overriding action, the "disable" call made by the library will well.. disable all logging! Not what you want.

It follows that we need to introduce a weak form of disabling that will get automatically overridden when the user configures log4j. 

There are other solutions around this problem.

1) We could simply remove the "No appenders" message. This has been discussed/suggested before. I think that it is important to give the new user some active feedback when she forgets to initialize log4j.

2) The library adds a NullAppender to root category. This is really very easy to do and should have negligible impact on performance but it's definitely a hack.  

At 13:28 31.01.2001 -0500, you wrote:
>I'm using log4j in what is effectively a library -- code that is
>called from lots of places (different applications and jvms), some of
>which I don't write.  I am using log4j in the library, and
>applications that I write properly configure log4j.  However, I would
>like the library to be usable from code that is not log4j aware, and
>in particular not have the "No appenders could be found ... " message
>printed.
>
>I would like to be able to either:
>
>1) Turn off the printing of the no appender warning message for a
>particular category.  This could easily be implemented by a method in
>Category that sets emittedNoAppenderWarning to true.

You probably don't want to bother.


>2) (Possibly a better solution) Disable all logging from the library
>by default, but enable logging if log4j is configured.  This can, I
>believe, be accomplished by calling BasicConfigurator.disableAll() in
>a static initialization block in each library class.  However, when
>the log4j system is configured, BasicConfigurator.overrideAsNeeded()
>must be called or the log4j.disableOverride property must be set.  I
>would prefer to be able to only disable the Categories used in the
>library.

Right. 


>It would be easier to solve this problem if one could determine if
>any configuration has been done, that is, if there are any Appenders
>attached to any Category.  It seems like this would be very easy to
>keep track of by simply setting a boolean in the Hierarchy.  Then, I
>would only call disableAll() in my libraries if no configuration had
>been done -- if configuration had been done, I would assume I am
>running in a log4j aware application, and that it will do appropriate
>configuration.
>
>I can think of several ways to solve this problem by extending
>Category or otherwise writing new code, but it seems like a common
>enough situation that there should be a way to do what I want with the
>standard distribution.  What solutions am I missing?


Introducing weak disabling seems the most reasonable thing to do. Comments? Ceki 



Re: Using Log4j in a Library

Posted by Peter Donald <do...@apache.org>.
At 01:28  31/1/01 -0500, Brendan McMahan wrote:
>1) Turn off the printing of the no appender warning message for a
>particular category.  This could easily be implemented by a method in
>Category that sets emittedNoAppenderWarning to true.

+1

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*