Hi Sergiu,

Could we standardize on a single way for adding logs. For example  
I've consistently done it the following way:

log.error(".... [" + sql + "]");

the reason for this:
1) quotes are common in strings
2) quotes need to be escaped in java and it's not convenient to write

But basically it's just us deciding to standardize on a syntax.

WDT?

Thanks
-Vincent

On Oct 6, 2007, at 10:43 AM, sdumitriu (SVN) wrote:

> Author: sdumitriu
> Date: 2007-10-06 10:43:56 +0200 (Sat, 06 Oct 2007)
> New Revision: 5310
>
> Modified:
>    xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/ 
> store/XWikiHibernateBaseStore.java
> Log:
> Replaced 2-line log with a 1-line one.
>
>
>
> Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/ 
> xpn/xwiki/store/XWikiHibernateBaseStore.java
> ===================================================================
> --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/ 
> xwiki/store/XWikiHibernateBaseStore.java      2007-10-05 21:03:11 UTC  
> (rev 5309)
> +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/ 
> xwiki/store/XWikiHibernateBaseStore.java      2007-10-06 08:43:56 UTC  
> (rev 5310)
> @@ -360,8 +360,7 @@
>          }
>          catch (Exception e) {
>              if ( log.isErrorEnabled() ) {
> -                log.error("While executing query: " + sql);
> -                log.error("Failed updating schema: " + e.getMessage 
> ());
> +                log.error("Failed updating schema while executing  
> query \"" + sql + "\":" + e.getMessage());
>              }
>          }
>          finally {
>
> _______________________________________________
> notifications mailing list
> [EMAIL PROTECTED]
> http://lists.xwiki.org/mailman/listinfo/notifications

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to