changeset 140:2d562d9c0044

8075713: Implement Logging class functionality Summary: The fix provides JDK Logger based implementation for DIO Logging class. Reviewed-by: alkonsta
author snazarki
date Tue, 24 Mar 2015 11:30:51 +0300
parents e68afdf9b782
children b545e51fda12
files src/se/classes/com/oracle/dio/utils/Logging.java
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/classes/com/oracle/dio/utils/Logging.java	Tue Mar 24 11:29:20 2015 +0300
+++ b/src/se/classes/com/oracle/dio/utils/Logging.java	Tue Mar 24 11:30:51 2015 +0300
@@ -24,6 +24,8 @@
  */
 
 package com.oracle.dio.utils;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 public final class Logging {
 
@@ -32,26 +34,30 @@
     }
 
     public static void reportError(String message) {
-        //  add an implementation
+        log(Level.SEVERE, message);
     }
 
     public static void reportError(String message1, String message2) {
-        //  add an implementation
+        reportError(message1 + message2);
     }
 
     public static void reportWarning(String message) {
-        //  add an implementation
+        log(Level.WARNING, message);
     }
 
     public static void reportWarning(String message1, String message2) {
-        //  add an implementation
+        reportWarning(message1 + message2);
     }
 
     public static void reportInformation(String message) {
-        //  add an implementation
+        log(Level.INFO, message);
     }
 
     public static void reportInformation(String message1, String message2) {
-        //  add an implementation
+        reportInformation(message1 + message2);
+    }
+
+    private static void log(Level level, String message) {
+        Logger.getLogger("DIO").log(level, message);
     }
 }