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:de.hofuniversity.iisys.neo4j.websock.query.encoding.unsafe.DeflateJsonQueryHandler.java

public DeflateJsonQueryHandler() {
    fLogger = Logger.getLogger(this.getClass().getName());
    fDebug = (fLogger.getLevel() == Level.FINEST);
    fCompression = DEFAULT_COMPRESSION_LEVEL;

    fInflater = new Inflater(true);
}

From source file:com.microsoft.azure.vmagent.util.TokenCache.java

protected TokenCache(final AzureCredentials.ServicePrincipal servicePrincipal) {
    LOGGER.log(Level.FINEST, "TokenCache: TokenCache: Instantiate new cache manager");
    this.credentials = servicePrincipal;
}

From source file:com.google.enterprise.connector.filenet4.Checkpoint.java

public Checkpoint() {
    jo = new JSONObject();

    String now = Value.calendarToIso8601(Calendar.getInstance());
    try {//from   w w w.j  av a  2s  . c o m
        jo.put(JsonField.LAST_DELETION_EVENT_TIME.toString(), now);
        jo.put(JsonField.UUID_DELETION_EVENT.toString(), "");
        jo.put(JsonField.LAST_CUSTOM_DELETION_TIME.toString(), now);
        jo.put(JsonField.UUID_CUSTOM_DELETED_DOC.toString(), "");
    } catch (JSONException e) {
        // This can't happen (only thrown if the value is NaN).
        logger.log(Level.FINEST, "Error constructing empty checkpoint", e);
    }
}

From source file:org.hawkular.apm.server.jms.span.SpanCacheMDB.java

@Override
public void onMessage(Message message) {
    if (log.isLoggable(Level.FINEST)) {
        log.finest("Message received=" + message);
    }//from   ww  w.j  a va2s .com

    try {
        String tenantId = message.getStringProperty("tenant");

        String data = ((TextMessage) message).getText();

        List<Span> items = mapper.readValue(data, typeRef);

        spanCache.store(tenantId, items, SpanUniqueIdGenerator::toUnique);

    } catch (JMSException | IOException | CacheException e) {
        log.log(Level.SEVERE, "Failed to process message", e);
    }
}

From source file:com.messagemedia.restapi.client.v1.internal.http.interceptors.HmacMmv2Interceptor.java

@Override
public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {

    StringBuilder toSign = new StringBuilder();
    toSign.append(HttpHeaders.DATE);/*  w w w. j av a2 s.c  om*/
    toSign.append(": ");
    toSign.append(request.getFirstHeader(HttpHeaders.DATE).getValue());
    toSign.append("\n");
    toSign.append(request.getRequestLine().toString());

    boolean hasContent = request.containsHeader(HttpHeaders.CONTENT_MD5);
    final String headers;
    if (hasContent) {
        toSign.append("\n");
        toSign.append(HttpHeaders.CONTENT_MD5);
        toSign.append(": ");
        toSign.append(request.getFirstHeader(HttpHeaders.CONTENT_MD5));
        headers = HEADERS_WITH_CONTENT;
    } else {
        headers = HEADERS_WITHOUT_CONTENT;
    }

    String stringToSign = toSign.toString();
    LOGGER.log(Level.FINEST, "String to sign: " + stringToSign);
    String hmac = HMACUtils.sha1(userSecret, stringToSign);
    String headerValue = String.format(AUTH_HEADER_TEMPLATE, userKey, headers, hmac);
    request.setHeader(HttpHeaders.AUTHORIZATION, headerValue);
    LOGGER.log(Level.FINE, "Header value: " + headerValue);
}

From source file:de.hofuniversity.iisys.neo4j.websock.query.encoding.logging.LoggingTSafeJsonQueryHandler.java

public LoggingTSafeJsonQueryHandler() {
    fLogger = Logger.getLogger(this.getClass().getName());
    fDebug = (fLogger.getLevel() == Level.FINEST);
}

From source file:de.hofuniversity.iisys.neo4j.websock.query.encoding.safe.TSafeDeflateJsonQueryHandler.java

public TSafeDeflateJsonQueryHandler(final String compression) {
    fLogger = Logger.getLogger(this.getClass().getName());
    fDebug = (fLogger.getLevel() == Level.FINEST);

    int tmpComp = DEFAULT_COMPRESSION_LEVEL;

    if (WebsockConstants.FASTEST_COMPRESSION.equals(compression)) {
        tmpComp = Deflater.BEST_SPEED;
    } else if (WebsockConstants.BEST_COMPRESSION.equals(compression)) {
        tmpComp = Deflater.BEST_COMPRESSION;
    } else {//from   ww  w  .  jav a  2  s  .  c o m
        fLogger.log(Level.WARNING, "unknown compression level '" + compression + "'; using default.");
    }

    fCompression = tmpComp;
}

From source file:nl.talsmasoftware.enumerables.support.json.jackson2.Compatibility.java

/**
 * Attempts to call <code>JsonParser.getTypeId()</code>.
 * However, this method was only added in Jackson version 2.3,
 * so it may not be possible to call it before then.
 * Therefore we anticipate this method not being available.
 *
 * @param jsonParser The json parser to call <code>getTypeId()</code> on.
 * @return The result of the call, or <code>null</code> if the method was not yet defined.
 *//*from   ww w  .ja v a  2s.  c om*/
static Object getTypeId(JsonParser jsonParser) {
    if (jsonParser != null)
        try {
            return call(jsonParser, "getTypeId");
        } catch (NoSuchMethodException nsme) {
            LOGGER.log(Level.FINEST, "No getTypeId() method; is Jackson version less than 2.3 ?", nsme);
        }
    return null;
}

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

public static void writeToFile(JSONObject jo, String filename) {
    HLogger.log(Level.FINEST, "Attempting to write json to " + filename + "\n" + jo.toString());
    // an array wrapper that we use to allow us to put a comment at the top
    // of the file to tell people not to edit
    JSONArray ja = new JSONArray();
    ja.put("This file is part of the HyperPool Automation Tool (HAT)");
    ja.put(" 2014 Stephen Stafford  all rights wossnamed");
    ja.put("DO NOT EDIT THIS FILE BY HAND.  BAD THINGS WILL HAPPEN!!");
    ja.put(jo);/*w w  w  .j av  a 2 s .c  o m*/
    HLogger.log(Level.FINEST,
            "After wrapping with comments array json looks " + "like: \n" + prettify(ja.toString()));
    String s = ja.toString();
    s = prettify(s);

    File f = new File(Constants.JSON_FILEPATH);
    f.mkdirs();
    f = new File(Constants.JSON_FILEPATH + filename);
    HLogger.log(Level.FINEST, "Attempting to write to file: " + filename);
    try (PrintWriter p = new PrintWriter(f)) {
        p.println(s);
        HLogger.log(Level.FINEST, "Wrote to file: " + filename);
    } catch (FileNotFoundException ex) {
        HLogger.log(Level.SEVERE, "Caught exception whilst trying to write to " + "file: " + filename, ex);
        Logger.getLogger(JsonFileHelper.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:fr.logfiletoes.TailerListenerUnit.java

public void handle(String line) {
    LOG.log(Level.FINEST, "handle log: " + line);
    Matcher matcher = unit.getPattern().matcher(line);
    if (unit.getConcatPreviousPattern() != null
            && unit.getConcatPreviousPattern().matcher(line).find() == false) {
        if (sb != null) {
            sb.append("\n").append(line);
        }//from w  w  w  .  j  a  va2  s  .  c  o m
    } else {
        if (sb != null) {
            json.put("message", sb.toString());
            json.put("host", host);
            String id = null;

            // Save StringBuilder if concat previous not null (wait stacktrace for example, no log end line)
            if (unit.getConcatPreviousPattern() != null) {
                saveToElasticsearch();
            }
        }
        sb = new StringBuilder(line);
        json = new JSONObject();
        while (matcher.find()) {
            for (int i = 1; i <= matcher.groupCount(); i++) {
                String field = unit.getGroupToField().get(i);
                if (field != null) {
                    json.put(field, matcher.group(i));
                    // Surcharge du message
                    if ("message".equals(field)) {
                        sb = new StringBuilder(matcher.group(i));
                    }
                }
            }

            if (unit.getAddFieldToTimestamp() != null && unit.getSdf() != null
                    && unit.getFieldToTimestamp() != null) {
                String timestampFieldGroup = unit.getGroupToField().get(unit.getFieldToTimestamp());
                if (timestampFieldGroup != null) {
                    String date = json.getString(timestampFieldGroup);
                    try {
                        Date timestamp = unit.getSdf().parse(date);
                        json.put(unit.getAddFieldToTimestamp(), dateFormat.format(timestamp));
                    } catch (ParseException exception) {
                        LOG.warning("Unable to parse date \"" + date + "\" with pattern \""
                                + unit.getSdf().toPattern() + "\"");
                    }
                }
            }
        }

        // Save immediately StringBuilder if concat previous is null (no multiline log)
        if (unit.getConcatPreviousPattern() == null) {
            saveToElasticsearch();
        }

    }
}