src/demo/share/jpackager/JNLPConverter/src/jnlp/converter/Log.java
branchJDK-8200758-branch
changeset 56963 eaca4369b068
equal deleted inserted replaced
56962:a769ad2d40d6 56963:eaca4369b068
       
     1 /*
       
     2  * Copyright (c) 2018, 2018, Oracle and/or its affiliates. All rights reserved.
       
     3  * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
       
     4  */
       
     5 package jnlp.converter;
       
     6 
       
     7 public class Log {
       
     8     private static boolean verbose = false;
       
     9 
       
    10     public static void setVerbose(boolean verbose) {
       
    11         Log.verbose = verbose;
       
    12     }
       
    13 
       
    14     public static boolean isVerbose() {
       
    15         return verbose;
       
    16     }
       
    17 
       
    18     public static void verbose(String msg) {
       
    19         if (verbose) {
       
    20             System.out.println(msg);
       
    21         }
       
    22     }
       
    23 
       
    24     public static void info(String msg) {
       
    25         System.out.println("Info: " + msg);
       
    26     }
       
    27 
       
    28     public static void warning(String msg) {
       
    29         System.err.println("Warning: " + msg);
       
    30     }
       
    31 
       
    32     public static void error(String msg) {
       
    33         System.err.println("Error: " + msg);
       
    34         System.exit(1);
       
    35     }
       
    36 }