You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tim Reilly <ti...@consultant.com> on 2004/03/14 05:00:37 UTC

RE: [id] use of commons-logging

Since there is a dependency on commons-logging; any issues with using it?

For example in IdentifierGeneratorFactory.java line 53

-        } catch (Exception ex) {
-            // ignore as default implementation will be used.
+        }
+        catch (Exception ex) {
+            if (log.isInfoEnabled()) {
+                log.info(ex);
+            }

There are two other similar places in the uuid packages I was think it might
be useful to log what's happening in the recoverable exceptions.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [id] use of commons-logging

Posted by Phil Steitz <ph...@steitz.com>.
Stephen Colebourne wrote:
> I'll admit to being surprised that [id] has any dependencies. When it was
> created I was assuing that none would be needed.
> Stephen
> 

Currently, we depend on [discovery], essentially to make implementation 
decisions pluggable / configurable.  This brings [logging].  We also 
depend on [codec] (for part of the uuid impl).  If you have ideas about 
how these dependencies could be removed without (significant) loss, and 
you see them as a problem / limitation, please feel free to jump with 
suggestions or changes at any time ;-)

Phil


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [id] use of commons-logging

Posted by Stephen Colebourne <sc...@btopenworld.com>.
I'll admit to being surprised that [id] has any dependencies. When it was
created I was assuing that none would be needed.
Stephen

----- Original Message -----
From: "Tim Reilly" <ti...@consultant.com>
> Since there is a dependency on commons-logging; any issues with using it?
>
> For example in IdentifierGeneratorFactory.java line 53
>
> -        } catch (Exception ex) {
> -            // ignore as default implementation will be used.
> +        }
> +        catch (Exception ex) {
> +            if (log.isInfoEnabled()) {
> +                log.info(ex);
> +            }
>
> There are two other similar places in the uuid packages I was think it
might
> be useful to log what's happening in the recoverable exceptions.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [id] use of commons-logging

Posted by Phil Steitz <ph...@steitz.com>.
Tim Reilly wrote:
> Since there is a dependency on commons-logging; any issues with using it?
> 
> For example in IdentifierGeneratorFactory.java line 53
> 
> -        } catch (Exception ex) {
> -            // ignore as default implementation will be used.
> +        }
> +        catch (Exception ex) {
> +            if (log.isInfoEnabled()) {
> +                log.info(ex);
> +            }
> 
> There are two other similar places in the uuid packages I was think it might
> be useful to log what's happening in the recoverable exceptions.
> 
I would be -1 to the change above, since the "no configuration present, so 
use default" situation is not really exceptional.  I would be careful 
adding logging elsewhere if there is any chance that it will end up 
generating a large volume of log messages under normal circumstances.

Phil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org