APISonar


java.util.logging.Logger.log

> java > util > logging > Logger > log
java APIs util APIs logging APIs Logger APIs log APIs

Example 1
private final Logger log;

    public void warn(Throwable t)
    {
        log.log(Level.WARNING, "", t);
    }
Example 2
protected Logger log = StandardServer.log;

    public XMLReader getReader() {

        try {
            return (getXMLReader());
        } catch (SAXException e) {
            log.log(Level.SEVERE, CANNOT_GET_XML_READER_EXCEPTION, e);
            return (null);
        }

    }
Example 3
private Logger _log;

    public void log(LogRecord record) 
    {
        _log.log(record);
    }
Example 4
private Logger log = null;

    public void log(LogLevel level, String info, Object... objects) {

        /**
         * NOTE: only when enable is OK to record the log
         */
        if (isEnableFileOutSus == false && isEnableConsoleOutSus == false) {
            return;
        }
		
        Level l = getLevel(level);
		
        log.log(l, info, objects);
    }
Example 5
private final Logger log;

    public void info(String msg, Object ... args)
    {
        log.log(Level.INFO, msg, args);
    }
Example 6
protected Logger log = LogFacade.getLogger();

    public Object peek() {

        try {
            return (stack.peek());
        } catch (EmptyStackException e) {
            log.log(Level.WARNING, LogFacade.EMPTY_STACK_EXCEPTION);
            return (null);
        }

    }
Example 7
public void report(Logger log) {
    long stopTime = System.currentTimeMillis() - startTime;
    log.log(Level.INFO, "Total time: {0}", getReadableTime(stopTime));

    System.gc();
    Runtime r = Runtime.getRuntime();
    long mb = 1024L * 1024;
    log.log(Level.INFO, "Final Memory: {0}M/{1}M", 
            new Object[]{(r.totalMemory() - r.freeMemory()) / 
                    mb, r.totalMemory() / mb});    
  }
Example 8
protected Logger log = Logger.getLogger(getClass().getName());

    public void rollback() {
        try {
            this.useConnection.rollback();
        }
        catch (SQLException e) {
            log.log(Level.SEVERE, "Caught exception rollbacking connection: " + e, e);
        }
    }
Example 9
public static void logPolicy(Logger log, Level level, String msg, PolicyComponent pc) {
        if (!log.isLoggable(level)) {
            return;
        }
        if (null == pc) {
            log.log(level, msg);
            return;
        }
        StringBuilder buf = new StringBuilder();
        buf.append(msg);
        nl(buf);
        printPolicyComponent(pc, buf, 0);
        log.log(level, buf.toString());
    }
Example 10
protected Logger log = StandardServer.log;

    public void register(String publicId, String entityURL) {

        if (log.isLoggable(Level.FINE)) {
            log.log(Level.FINE, "register('" + publicId + "', '" + entityURL + "'");
        }
        entityValidator.put(publicId, entityURL);

    }
Example 11
private static final Logger log = Logger.getLogger(mxMultiplicity.class.getName());

	public int getMaxValue()
	{
		try
		{
			return Integer.parseInt(max);
		}
		catch (NumberFormatException e)
		{
			log.log(Level.SEVERE, "Failed to parse max value " + max, e);
		}

		return 0;
	}
Example 12
private Logger logger;

    public void write(char cbuf[], int off, int len) {
        if (autoFlush) {
            logger.log(Level.INFO, new String(cbuf, off, len));
        } else {
            String s = new String(cbuf, off, len);
            if (log == null) {
                log = new StringBuffer(s);
            } else {
                log = log.append(s);
            }
        }
    }
Example 13
private static final Logger log = Logger.getLogger("org.opensolaris.opengrok");

    public void handleNotification(Notification n, Object hb) {
        if (n.getType().equals("timer.notification")) {
            log.finer("Received timer notification");
            if (enabled) {
                index(false);
            } else {
                log.info("Indexing is disabled, doing nothing");
            }
        } else {
            log.log(Level.WARNING, "Received unknown notification type: {0}", n.getType());
        }
    }
Example 14
private static final Logger LOG = LogUtils.getL7dLogger(WebSocketUndertowServletRequest.class);

    public String getLocalName() {
        LOG.log(Level.FINE, "getLocalName()");
        try {
            return new URL(channel.getUrl()).getHost();
        } catch (MalformedURLException e) {
            LOG.log(Level.FINE, "getLocalName error", e);
            return null;
        }
    }
Example 15
private Logger LOG;

    public void fileFolderCreated(FileEvent fe) {
        LOG.log(Level.INFO, "fileFolderCreated: {0}", fe.getFile());
        LOG.log(Level.INFO, "Thread dump", new Exception());
        events.add(fe);
    }
Example 16
private static final Logger log = Logger.getLogger(mxGraphics2DCanvas.class.getName());

	public mxGraphics2DCanvas(Graphics2D g)
	{
		this.g = g;

		// Initializes the cell renderer pane for drawing HTML markup
		try
		{
			rendererPane = new CellRendererPane();
		}
		catch (Exception e)
		{
			log.log(Level.WARNING, "Failed to initialize renderer pane", e);
		}
	}
Example 17
private static final Logger       LOG = Log.getLogger();

  private static void safelyCloseSocket(final Socket s) {
    if (s != null) {
      try {
        s.close();
      } catch (final IOException e) {
        LOG.log(Level.WARNING, "Couldn't close socket", e);
      }
    }
  }
Example 18
protected static final Logger log = Logger.getLogger("org.klomp.snark.peer");

    void keepAliveMessage ()
    {
        log.log(Level.FINEST, peer + " rcv alive");
        /* XXX - ignored */
    }
Example 19
private final Logger log = Logger.getLogger(DTFJ_LOGGER_NAME);

	private void printExceptions() {
		if (0 == exceptions.size()) {
			return; //nothing went wrong
		}
		log.fine("Warning : errors encountered whilst creating ImageFactory"); //$NON-NLS-1$
		for (int i = 0; i < exceptions.size(); i++) {
			Object obj = exceptions.get(i);
			if (obj instanceof Exception) {
				Exception e = (Exception) obj;
				log.log(Level.FINE, e.getMessage(), e); //write to log if turned on
			}
		}
	}
Example 20
private static final Logger log = LogFacade.getLogger();

    public void init() {
        try {
            initialize();
        } catch( Throwable t ) {
            String msg = MessageFormat.format(rb.getString(LogFacade.FAILED_SERVICE_INIT_EXCEPTION), domain);
            log.log(Level.SEVERE, msg, t);
        }
    }
Example 21
private static Logger log = Logger.getLogger(
        StandardService.class.getName());

    public void init() {
        try {
            initialize();
        } catch( Throwable t ) {
            log.log(Level.SEVERE,
                    sm.getString("standardService.initialize.failed", domain),
                    t);
        }
    }
Example 22
private static final Logger log = Logger.getLogger(ManagedChannelImpl.class.getName());

  public ManagedChannelImpl shutdown() {
    log.log(Level.FINE, "[{0}] shutdown() called", getLogId());
    if (!shutdown.compareAndSet(false, true)) {
      return this;
    }
    delayedTransport.shutdown();
    channelExecutor.executeLater(new Runnable() {
        @Override
        public void run() {
          cancelIdleTimer();
        }
      }).drain();
    log.log(Level.FINE, "[{0}] Shutting down", getLogId());
    return this;
  }
Example 23
static Logger log = Logger.getLogger("SSL");

    public void setSink(IOChannel net) throws IOException {
        try {
            initSsl();
            super.setSink(net);
        } catch (GeneralSecurityException e) {
            log.log(Level.SEVERE, "Error initializing ", e);
        }
    }
Example 24
protected Logger log = StandardServer.log;

    public void warning(SAXParseException exception) throws SAXException {
         if (errorHandler != null) {
             log.log(Level.WARNING, PARSE_WARNING_ERROR,
                     new Object[] {exception.getLineNumber(), exception.getColumnNumber(),
                                   exception.getMessage()});

            errorHandler.warning(exception);
        }

    }
Example 25
private Logger LOG;

    public void clipboardChanged(ClipboardEvent ev) {
        listenerCalls++;
        LOG.log(Level.INFO, "clipboardChanged: " + listenerCalls, new Exception());
    }