← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5853: Change the logging method in sms service package

 

------------------------------------------------------------
revno: 5853
committer: Long <thanhlongngo1988>
branch nick: dhis2
timestamp: Thu 2012-02-02 20:08:43 +0700
message:
  Change the logging method in sms service package
modified:
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/SmsConfigurationManagerImpl.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/OutboundSmsServiceImpl.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/TestOutboundSmsService.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SimplisticHttpGetGateWay.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SmsLibService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/SmsConfigurationManagerImpl.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/SmsConfigurationManagerImpl.java	2011-12-15 20:41:45 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/SmsConfigurationManagerImpl.java	2012-02-02 13:08:43 +0000
@@ -51,7 +51,7 @@
             try
             {
                 smsConfigurable.initialize( smsConfiguration );
-                log.info( "Initialized " + smsConfigurable);
+                log.debug( "Initialized " + smsConfigurable);
             }
             catch ( Throwable t )
             {

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/OutboundSmsServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/OutboundSmsServiceImpl.java	2011-12-15 20:41:45 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/OutboundSmsServiceImpl.java	2012-02-02 13:08:43 +0000
@@ -40,7 +40,7 @@
     protected void setTransportService( OutboundSmsTransportService transportService )
     {
         this.transportService = transportService;
-        log.info( "Got OutboundSmsTransportService: " + transportService.getClass().getSimpleName() );
+        log.debug( "Got OutboundSmsTransportService: " + transportService.getClass().getSimpleName() );
 
     }
 
@@ -87,7 +87,7 @@
         }
         catch ( SmsServiceException e )
         {
-            log.info( "Exception sending message " + sms, e );
+            log.debug( "Exception sending message " + sms, e );
             sms.setStatus( OutboundSmsStatus.ERROR );
         }
     }

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/TestOutboundSmsService.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/TestOutboundSmsService.java	2011-12-15 08:46:42 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/TestOutboundSmsService.java	2012-02-02 13:08:43 +0000
@@ -29,7 +29,7 @@
         if (!enabled)
             throw new SmsServiceNotEnabledException();
             
-        log.info( "Send message: " + sms );
+        log.debug( "Send message: " + sms );
     }
 
     @Override
@@ -37,7 +37,7 @@
         throws SmsServiceException
     {
         this.enabled = config.isEnabled();
-        log.info( "initialize()" );
+        log.debug( "initialize()" );
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SimplisticHttpGetGateWay.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SimplisticHttpGetGateWay.java	2011-12-20 12:46:37 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SimplisticHttpGetGateWay.java	2012-02-02 13:08:43 +0000
@@ -66,7 +66,7 @@
     public void startGateway()
         throws TimeoutException, GatewayException, IOException, InterruptedException
     {
-        Logger.getInstance().logInfo( "Starting gateway.", null, getGatewayId() );
+        Logger.getInstance().logDebug( "Starting gateway.", null, getGatewayId() );
         super.startGateway();
     }
 
@@ -74,7 +74,7 @@
     public void stopGateway()
         throws TimeoutException, GatewayException, IOException, InterruptedException
     {
-        Logger.getInstance().logInfo( "Stopping gateway.", null, getGatewayId() );
+        Logger.getInstance().logDebug( "Stopping gateway.", null, getGatewayId() );
         super.stopGateway();
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SmsLibService.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SmsLibService.java	2011-12-20 12:46:37 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/SmsLibService.java	2012-02-02 13:08:43 +0000
@@ -111,28 +111,28 @@
         // return;
         // }
 
-        log.info( "Initializing SmsLib" );
+        log.debug( "Initializing SmsLib" );
 
         this.config = smsConfiguration;
 
         ServiceStatus status = getService().getServiceStatus();
         if ( status == ServiceStatus.STARTED || status == ServiceStatus.STARTING )
         {
-            log.info( "Stopping SmsLib" );
+            log.debug( "Stopping SmsLib" );
             stopService();
         }
 
-        log.info( "Loading configuration" );
+        log.debug( "Loading configuration" );
         reloadConfig();
 
         if ( config.isEnabled() )
         {
-            log.info( "Starting SmsLib" );
+            log.debug( "Starting SmsLib" );
             startService();
         }
         else
         {
-            log.info( "Sms not enabled, won't start service" );
+            log.debug( "Sms not enabled, won't start service" );
         }
     }
 
@@ -219,7 +219,7 @@
             try
             {
                 service.addGateway( gatewayFactory.create( gatewayConfig ) );
-                log.info( "Added gateway " + gatewayConfig.getName() );
+                log.debug( "Added gateway " + gatewayConfig.getName() );
             }
             catch ( GatewayException e )
             {
@@ -236,7 +236,7 @@
         @Override
         public void process( AGateway gateway, OutboundMessage msg )
         {
-            log.info( "Sent message through gateway " + gateway.getGatewayId() + ": " + msg );
+            log.debug( "Sent message through gateway " + gateway.getGatewayId() + ": " + msg );
 
         }
     }