Package net.bpiwowar.mg4j.extensions.utils

Examples of net.bpiwowar.mg4j.extensions.utils.LoggerPrintStream


    long ts = System.currentTimeMillis();
    logger.info(String.format("%s -- %d%% memory available (total %d Mb)", formatter
        .format(Calendar.getInstance().getTime()), Memory.percAvailableMemory(),
        Memory.maxMemory() / (1024 * 1024)));
    int i = 0;
    LoggerPrintStream out = new LoggerPrintStream(logger, Level.INFO);
    synchronized (tasks) {
      for (Task task : tasks) {
        i++;
        final int size = tasks.size();
        out.format("\t[%d/%d] ", i, size);
        task.print(ts, out);
        out.flush();
      }
    }
  }
View Full Code Here

TOP

Related Classes of net.bpiwowar.mg4j.extensions.utils.LoggerPrintStream

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.