Example usage for java.util.logging Level FINEST

List of usage examples for java.util.logging Level FINEST

Introduction

In this page you can find the example usage for java.util.logging Level FINEST.

Prototype

Level FINEST

To view the source code for java.util.logging Level FINEST.

Click Source Link

Document

FINEST indicates a highly detailed tracing message.

Usage

From source file:io.stallion.tests.integration.textSite.TextFileTest.java

@BeforeClass
public static void setUpClass() throws Exception {
    Log.setLogLevel(Level.FINEST);
    startApp("/text_site");
}

From source file:havocx42.Program.java

private static void initRootLogger() throws SecurityException, IOException {

    FileHandler fileHandler;//from w ww  .j  ava2  s . co m
    fileHandler = new FileHandler("PRWeaponStats.%u.%g.txt", 1024 * 1024 * 8, 3, false);
    fileHandler.setLevel(Level.FINEST);
    fileHandler.setFormatter(new SimpleFormatter());
    Logger rootLogger = Logger.getLogger("");
    Handler[] handlers = rootLogger.getHandlers();
    for (Handler handler : handlers) {
        handler.setLevel(Level.INFO);
    }
    rootLogger.setLevel(Level.FINEST);
    rootLogger.addHandler(fileHandler);
}

From source file:it.unibo.alchemist.utils.L.java

/**
 * @param s//  w  ww.ja  v a2s .co m
 *            the String to log
 */
@Deprecated
public static void debug(final String s) {
    log(Level.FINEST, s);
}

From source file:com.clothcat.hpoolauto.HtmlUploader.java

/**
 * Upload the html via FTP/*from ww  w .  j av a2  s  .co m*/
 */
public static void uploadHtml() {
    FTPClient ftpc = new FTPClient();
    FTPClientConfig conf = new FTPClientConfig();
    ftpc.configure(conf);
    try {
        ftpc.connect(Constants.FTP_HOSTNAME);
        ftpc.login(Constants.FTP_USERNAME, Constants.FTP_PASSWORD);
        File dir = new File(Constants.HTML_FILEPATH);
        File[] files = dir.listFiles();
        ftpc.changeWorkingDirectory("/htdocs");
        for (File f : files) {
            HLogger.log(Level.FINEST, "Uploading file: " + f.getName());
            FileInputStream fis = new FileInputStream(f);
            ftpc.storeFile(f.getName(), fis);
        }
        ftpc.logout();
    } catch (IOException ioe) {
        ioe.printStackTrace();
    } finally {
        if (ftpc.isConnected()) {
            try {
                ftpc.disconnect();
            } catch (IOException ioe) {
            }
        }
    }
}

From source file:com.ibm.xsp.xflow.activiti.util.HttpClientUtil.java

public static String post(String url, Cookie[] cookies, String content) {
    String body = null;/* www  . j  a  v  a2 s  . co m*/
    try {
        StringBuffer buffer = new StringBuffer();
        DefaultHttpClient httpClient = new DefaultHttpClient();
        HttpPost postRequest = new HttpPost(url);

        StringEntity input = new StringEntity(content);
        input.setContentType("application/json");
        postRequest.setEntity(input);

        httpClient.setCookieStore(new BasicCookieStore());
        String hostName = new URL(url).getHost();
        String domain = hostName.substring(hostName.indexOf("."));
        for (int i = 0; i < cookies.length; i++) {
            if (logger.isLoggable(Level.FINEST)) {
                logger.finest("Cookie:" + cookies[i].getName() + ":" + cookies[i].getValue() + ":"
                        + cookies[i].getDomain() + ":" + cookies[i].getPath());
            }
            BasicClientCookie cookie = new BasicClientCookie(cookies[i].getName(), cookies[i].getValue());
            cookie.setVersion(0);
            cookie.setDomain(domain);
            cookie.setPath("/");

            httpClient.getCookieStore().addCookie(cookie);
        }
        HttpResponse response = httpClient.execute(postRequest);
        BufferedReader br = new BufferedReader(new InputStreamReader((response.getEntity().getContent())));

        String output;
        if (logger.isLoggable(Level.FINEST)) {
            logger.finest("Output from Server .... \n");
        }
        while ((output = br.readLine()) != null) {
            if (logger.isLoggable(Level.FINEST)) {
                logger.finest(output);
            }
            buffer.append(output);
        }

        httpClient.getConnectionManager().shutdown();

        body = buffer.toString();

    } catch (Exception e) {
        e.printStackTrace();
    }

    return body;
}

From source file:com.clothcat.hpoolauto.JsonFileHelper.java

/**
 * Reads a JSON Object from the filename passed.
 *
 * When we store json files we add three lines of comment in a wrapping array,
 * so we remove them here and return the json object contained in the wrapper.
 *
 * @param filename/*from   ww  w. j a v a2 s  .  c om*/
 * @return
 */
public static JSONObject readFromFile(String filename) {
    try {
        HLogger.log(Level.FINEST, "Attempting to reaad JSON from " + filename);
        File f = new File(Constants.JSON_FILEPATH + filename);
        // if the file sn't there then return an empty JSONObject
        if (!f.exists()) {
            HLogger.log(Level.FINEST, "File did not exist, returning an " + "empty JSONObject");
            return new JSONObject();
        }
        HLogger.log(Level.FINEST, "Constructing JSONArray");
        JSONArray ja = new JSONArray(new JSONTokener(new FileReader(f)));
        HLogger.log(Level.FINEST, "Array fetched:\n" + prettify(ja.toString()));
        // the actual JSONObject we want is element 3 since there are three 
        // lines of comment that start the array
        HLogger.log(Level.FINEST, "Unwrapping and returning: \n" + prettify(ja.getJSONObject(3).toString()));
        return ja.getJSONObject(3);
    } catch (FileNotFoundException | JSONException ex) {
        HLogger.log(Level.SEVERE, "Caught exception in JsonFileHelper.readFromFile.", ex);
        Logger.getLogger(JsonFileHelper.class.getName()).log(Level.SEVERE, null, ex);
    }
    // if we get here someting is seriously broken!
    HLogger.log(Level.SEVERE, "Reached the bottom of JsonFileHelper.readFromFile"
            + "(String filename) method.  Something majorly fucked up!");
    throw new RuntimeException(
            "Reached the bottom of JsonFileHelper." + "readFromFile(String filename) method.");
}

From source file:javancss.ParseDebugTest.java

@Override
protected Javancss measureTestFile(int testFileId) {
    Logger logger = Logger.getLogger("javancss");
    logger.setLevel(Level.FINEST);

    PrintStream stdout = System.out;
    PrintStream stderr = System.err;

    try {/*w  w w.j  a  v a 2s .  co  m*/
        System.setOut(new PrintStream(new NullOutputStream()));
        System.setErr(new PrintStream(new NullOutputStream()));

        return super.measureTestFile(testFileId);
    } finally {
        logger.setLevel(Level.OFF);
        System.setOut(stdout);
        System.setErr(stderr);
    }
}

From source file:edu.usu.sdl.openstorefront.web.init.AngularRewriteRule.java

@Override
public boolean initialise(ServletContext servletContext) {
    log.log(Level.FINEST, "Initialize Angular Rule");
    return super.initialise(servletContext);
}

From source file:edu.usu.sdl.openstorefront.web.rest.TraceInterceptor.java

@Override
public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException {
    if (log.isLoggable(Level.FINEST)) {
        StringBuilder message = new StringBuilder();
        message.append(request.getMethod()).append(" ");
        if (StringUtils.isNotBlank(request.getQueryString())) {
            message.append(request.getRequestURL()).append("?").append(request.getQueryString());
        } else {/*w w w  .  j  a  v a2s.  c  om*/
            message.append(request.getRequestURL());
        }
        log.finest(message.toString());
    }
    context.proceed();
}

From source file:edu.usu.sdl.openstorefront.doc.EntityProcessor.java

public static List<EntityDocModel> processEntites(List<Class> entities) {
    List<EntityDocModel> entityDocModels = new ArrayList<>();

    log.log(Level.FINEST, "Construct Entities");
    for (Class entity : entities) {
        EntityDocModel docModel = createEntityModel(entity);
        addSuperClass(entity.getSuperclass(), docModel);
        for (Class interfaceClass : entity.getInterfaces()) {
            docModel.getImplementedEntities().add(createEntityModel(interfaceClass));
        }//ww w .j  a v a 2  s. c  o  m
        entityDocModels.add(docModel);
    }

    entityDocModels.sort((EntityDocModel o1, EntityDocModel o2) -> o1.getName().compareTo(o2.getName()));
    return entityDocModels;
}