directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r494281 - /directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/BackupUtilities.java
Date Tue, 09 Jan 2007 00:56:38 GMT
Author: akarasulu
Date: Mon Jan  8 16:56:37 2007
New Revision: 494281

URL: http://svn.apache.org/viewvc?view=rev&rev=494281
Log:
keep this stuff quiet by logging to std out instead of System.out

Modified:
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/BackupUtilities.java

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/BackupUtilities.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/BackupUtilities.java?view=diff&rev=494281&r1=494280&r2=494281
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/BackupUtilities.java
(original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/BackupUtilities.java
Mon Jan  8 16:56:37 2007
@@ -5,16 +5,21 @@
 import javax.naming.directory.Attributes;
 import javax.naming.ldap.LdapContext;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 public class BackupUtilities
 {
+    private static final Logger log = LoggerFactory.getLogger( BackupUtilities.class );
+
     public static void backupDeleted( LdapContext ctx, Name deletedEntryName, Name operationPrincipal,
Attributes deletedEntry ) throws NamingException
     {
-        System.out.println( "User \"" + operationPrincipal + "\" has deleted entry \"" +
deletedEntryName + "\"" );
-        System.out.println( "Entry content was: " + deletedEntry );
+        log.info( "User \"" + operationPrincipal + "\" has deleted entry \"" + deletedEntryName
+ "\"" );
+        log.info( "Entry content was: " + deletedEntry );
         LdapContext backupCtx = ( LdapContext ) ctx.lookup( "ou=backupContext,ou=system"
);
         String deletedEntryRdn = deletedEntryName.get( deletedEntryName.size() - 1 );
         backupCtx.createSubcontext( deletedEntryRdn, deletedEntry );
-        System.out.println( "Backed up deleted entry to \"" + ( ( LdapContext ) backupCtx.lookup(
deletedEntryRdn ) ).getNameInNamespace() + "\"" );
+        log.info( "Backed up deleted entry to \"" + ( ( LdapContext ) backupCtx.lookup( deletedEntryRdn
) ).getNameInNamespace() + "\"" );
     }
 }



Mime
View raw message