Package java.util.logging

Examples of java.util.logging.Logger


        }
        EndpointInfo endpoint = ep.getEndpointInfo();
        if (endpoint.getService() == null) {
            return getLogger();
        }
        Logger logger = endpoint.getProperty("MessageLogger", Logger.class);
        if (logger == null) {
            String serviceName = endpoint.getService().getName().getLocalPart();
            InterfaceInfo iface = endpoint.getService().getInterface();
            String portName = endpoint.getName().getLocalPart();
            String portTypeName = iface.getName().getLocalPart();
View Full Code Here


 
 
  static public void logger() {
    // Create Logger
    try{
    Logger logger = Logger.getLogger("");
    logger.setLevel(Level.INFO);
    txtFile = new FileHandler("Logging.txt",true);
   
    // Create txt Formatter
    formatterTxt = new SimpleFormatter();
    txtFile.setFormatter(formatterTxt);
    logger.addHandler(txtFile);
   
    }catch(IOException ex)
    {
      System.out.println("Error while creating Log file to capture logging." + ex.getMessage());
    }
View Full Code Here

        String timespanStr = argOptions.getStringOption("timespan");
        TimeSpan timeSpan = new TimeSpan(timespanStr);

        if (argOptions.hasOption('v') || argOptions.hasOption("verbose")) {
            // Enable all the logging at the FINE level for the application
            Logger appRooLogger = Logger.getLogger("edu.ucla.sspace");
            Handler verboseHandler = new ConsoleHandler();
            verboseHandler.setLevel(Level.FINE);
            appRooLogger.addHandler(verboseHandler);
            appRooLogger.setLevel(Level.FINE);
            appRooLogger.setUseParentHandlers(false);
        }
       
        // all the documents are listed in one file, with one document per line
        Iterator<TemporalDocument> docIter = null;
        String fileList = (argOptions.hasOption("fileList"))
View Full Code Here

    /**
     * Sets the output level of the S-Space package according to the desired
     * level.
     */
    public static void setLevel(Level outputLevel) {
        Logger appRooLogger = Logger.getLogger("edu.ucla.sspace");
        Handler verboseHandler = new ConsoleHandler();
        verboseHandler.setLevel(outputLevel);
        appRooLogger.addHandler(verboseHandler);
        appRooLogger.setLevel(outputLevel);
        appRooLogger.setUseParentHandlers(false);
    }
View Full Code Here

     *        package (or super-package) of all classes reporting log messages.
     *
     * @since 2.0
     */
    public static void setLevel(String loggerNamespace, Level outputLevel) {
        Logger appRooLogger = Logger.getLogger(loggerNamespace);
        Handler verboseHandler = new ConsoleHandler();
        verboseHandler.setLevel(outputLevel);
        appRooLogger.addHandler(verboseHandler);
        appRooLogger.setLevel(outputLevel);
        appRooLogger.setUseParentHandlers(false);
    }
View Full Code Here

        System.loadLibrary("DCRaw");
        System.loadLibrary("LCJPEG");
        System.loadLibrary("LCTIFF");

        // Abbreviate metadata error messages, which can be scroll blinding.
        Logger logger = Logger.getLogger("com.lightcrafts.image.metadata");
        Handler handler = new TerseLoggingHandler(System.out);
        logger.addHandler(handler);
        logger.setUseParentHandlers(false);

        ProgressDialog dialog = Platform.getPlatform().getProgressDialog();
        ProgressThread thread = new ProgressThread(dialog) {
            public void run() {
                Images = new ImageList(
View Full Code Here

        Env.getPrinterProfiles();
    }

    private static void initLogging() {
        // Abbreviate metadata error messages, which can be scroll blinding.
        Logger logger = Logger.getLogger("com.lightcrafts.image.metadata");
        Handler handler = new TerseLoggingHandler(System.out);
        logger.addHandler(handler);
        logger.setUseParentHandlers(false);
    }
View Full Code Here

    }


    public void execute() throws org.apache.tools.ant.BuildException {

        Logger logger = AbstractCullConverter.logger;

        Handler[] handler = logger.getHandlers();
        for (int i = 0; i < handler.length; i++) {
            logger.removeHandler(handler[i]);
        }

        logger.setUseParentHandlers(false);
        AntLoggingHandler myHandler = new AntLoggingHandler(getProject());
        logger.addHandler(myHandler);
        logger.setLevel(Level.ALL);
        myHandler.setLevel(Level.ALL);


        try {
            Class[] classes = classdef.getClasses();
            JavaToJavaConverter[] conv = new JavaToJavaConverter[converterList.size()];
            int i = 0;
            for (AbstractConverterDefinition convDef : converterList) {
                conv[i++] = convDef.createConverter();
            }

            logger.fine("has " + conv.length + " converters and " + classes.length + " classes");
            for (int convIndex = 0; convIndex < conv.length; convIndex++) {
                for (int classIndex = 0; classIndex < classes.length; classIndex++) {
                    conv[convIndex].convert(classes[classIndex]);
                }
                conv[convIndex].finish();
View Full Code Here

        } catch (AssertionError err) {
            //err.printStackTrace();
            String msg = err.getMessage() + ". Variable reference $" + getDisplayName() +
                     (getSystemId() == null ? "" : " of " + getSystemId());
            // log here in case this is not handled properly
            Logger logger = Logger.getLogger("VariableReference");
            logger.severe("internal null reference error: " + msg);
            throw new XPathException(msg);
        }
    }
View Full Code Here

  private boolean removed = false;

  @Override
  public void publish(LogRecord record) {
   
    Logger logger = Logger.getLogger("");
    // this handler is no longer needed
    logger.removeHandler(this);
    // add new required handlers according to browser capabilities - and publish
    int handlerIndex = logger.getHandlers().length;
    LogController.addRequiredLogHanders(record);
    // call publish on newly added handlers - no need because publish is called on them next
    //LogController.getJsLogHandler().publish(record); // this handler is missed out - because its first?
   
    Logger localLogger = Logger.getLogger("ListenerLogHandler");
    localLogger.log(Level.FINE, "Log handlers added (" + (SaxonceApi.isLogHandlerExternal()? "includes external)": "internal only)"));   
  }
View Full Code Here

TOP

Related Classes of java.util.logging.Logger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.