Example usage for java.util.logging Level FINE

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

Introduction

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

Prototype

Level FINE

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

Click Source Link

Document

FINE is a message level providing tracing information.

Usage

From source file:org.apache.cxf.dosgi.topologymanager.ListenerHookImpl.java

public void added(Collection listeners) {
    LOG.log(Level.FINE, "ListenerHookImpl: added() {0}", listeners);
    for (Object li : listeners) {
        ListenerInfo listenerInfo = (ListenerInfo) li;
        LOG.log(Level.FINEST, "*** Filter: {0}", listenerInfo.getFilter());

        String className = getClassNameFromFilter(listenerInfo.getFilter());

        if (listenerInfo.getBundleContext().getBundle().equals(bctx.getBundle())) {
            LOG.finest("ListenerHookImpl: skipping request from myself");
            continue;
        }/*from www . j av a  2  s.c om*/

        if (listenerInfo.getFilter() == null) {
            LOG.finest("ListenerHookImpl: skipping empty filter");
            continue;
        }

        if (isClassExcluded(className)) {
            LOG.log(Level.FINE, "ListenerHookImpl: skipping import request for excluded class [{0}]",
                    className);
            continue;
        }

        tm.addServiceInterest(listenerInfo.getFilter());
    }
}

From source file:com.google.gwt.site.uploader.ResourceUploaderAppEngineImpl.java

@Override
public void uploadResource(String key, String hash, File data) throws IOException {

    throwIfNotInitialized();//ww w .ja va2 s.c o m

    if (logger.isLoggable(Level.FINE)) {
        logger.fine("uploading file: '" + key + "'");
    }

    Entity entityModel = new Entity(keyProvider.createKey(DOC_MODEL, key));

    Entity entityHash = new Entity(keyProvider.createKey(DOC_HASH, key));

    FileInputStream fileInputStream = null;
    try {
        String text = null;
        fileInputStream = new FileInputStream(data);
        if (isBinaryFile(key)) {
            byte[] byteArray = IOUtils.toByteArray(fileInputStream);
            text = Base64.encodeBase64String(byteArray);
        } else {
            text = IOUtils.toString(fileInputStream, "UTF-8");
        }

        entityModel.setProperty("html", new Text(text));
        entityHash.setProperty("hash", hash);

        // following two puts are not transactional. first put content, then hash.
        // in case the hash value would be put first and something goes wrong before
        // putting the content, the updated content will be lost
        ds.put(entityModel);
        ds.put(entityHash);

    } finally {
        IOUtils.closeQuietly(fileInputStream);
    }
}

From source file:edu.harvard.iq.dataverse.HandlenetServiceBean.java

public HandlenetServiceBean() {
    logger.log(Level.FINE, "Constructor");
}

From source file:org.jboss.arquillian.warp.impl.server.execution.WarpFilter.java

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    try {/*from w w  w .  ja  v  a2s . co m*/
        log.log(Level.FINE, "initializing {0}", WarpFilter.class.getSimpleName());
        ManagerBuilder builder = ManagerBuilder.from().extension(Class.forName(DEFAULT_EXTENSION_CLASS));
        manager = builder.create();
        manager.start();
        manager.bind(ApplicationScoped.class, Manager.class, manager);
        delegator = new RequestDelegator();
    } catch (Exception e) {
        throw new ServletException("Could not init " + WarpFilter.class.getSimpleName(), e);
    }
}

From source file:com.symbian.driver.plugins.ftptelnet.Activator.java

/**
 * The constructor
 */
public Activator() {
    plugin = this;
    LOGGER.log(Level.FINE, "Activator::Activator");
}

From source file:io.github.jeddict.jcode.util.FileUtil.java

private static ClassLoader getLoader() {
    Object is = currentLoader;/*from   w  ww .  j a va 2 s.c  o m*/
    if (is instanceof ClassLoader) {
        return (ClassLoader) is;
    }

    currentLoader = Thread.currentThread();

    if (loaderQuery == null) {
        loaderQuery = Lookup.getDefault().lookupResult(ClassLoader.class);
        loaderQuery.addLookupListener((LookupEvent ev) -> {
            LOG.fine("Loader cleared"); // NOI18N
            currentLoader = null;
        });
    }

    Iterator it = loaderQuery.allInstances().iterator();
    if (it.hasNext()) {
        ClassLoader toReturn = (ClassLoader) it.next();
        if (currentLoader == Thread.currentThread()) {
            currentLoader = toReturn;
        }
        LOG.log(Level.FINE, "Loader computed: {0}", currentLoader); // NOI18N
        return toReturn;
    } else {
        if (!noLoaderWarned) {
            noLoaderWarned = true;
            LOG.log(Level.WARNING, "No ClassLoader instance found in {0}", Lookup.getDefault() // NOI18N
            );
        }
        return null;
    }
}

From source file:mendeley2kindle.KindleDAO.java

public void open(String kindleLocal) throws IOException, JSONException {
    this.kindleLocal = kindleLocal;

    File path = new File(kindleLocal);
    File file = new File(path, KINDLE_COLLECTIONS_JSON);
    log.log(Level.FINER, "Loading collections data: " + file);
    if (file.exists() && file.canRead()) {
        FileReader fr = new FileReader(file);
        StringBuilder sb = new StringBuilder();
        char[] buf1 = new char[2048];
        for (int read = 0; (read = fr.read(buf1)) > 0;)
            sb.append(buf1, 0, read);/*from   w ww.  j  av a 2s  .  co  m*/

        collections = new JSONObject(sb.toString());
        log.log(Level.FINE, "Loaded kindle collections: " + path);
    } else {
        log.log(Level.FINE, "Kindle collections data " + file + " not found. Creating...");
        collections = new JSONObject();
    }
    isOpened = true;
}

From source file:main.java.miro.validator.fetcher.RsyncFetcher.java

public DownloadResult fetchObjectWithoutAdd(URI uri) {
    String destination = getRelativePath(uri);
    if (!alreadyDownloaded(uri)) {
        DownloadResult dlResult = new RsyncDownloader().downloadData(uri.toString(), destination);
        if (dlResult.wasSuccessful())
            downloadedURIs.add(uri);/*from   w ww  .j  a v a 2  s.co  m*/
        return dlResult;
    } else {
        log.log(Level.FINE, "Skipped download of " + uri.toString());
        return new DownloadResult(uri.toString(), destination);
    }
}

From source file:com.ibm.ws.lars.rest.RepositoryRESTResourceLoggingTest.java

@Test
public void testGetAsset(@Mocked final Logger logger, @Mocked final SecurityContext sc)
        throws InvalidIdException, NonExistentArtefactException {

    new Expectations() {
        {//from   w  ww  .j  ava  2s. com
            logger.isLoggable(Level.FINE);
            result = true;
            logger.fine("getAsset called with id of 'ffffffffffffffffffffffff'");
            sc.isUserInRole("Administrator");
            result = true;
        }
    };

    getRestResource().getAsset(NON_EXISTENT_ID, dummyUriInfo, sc);
}

From source file:demo.service.CustomerService.java

@DELETE
@Path("/{id}/")
public Response deleteCustomer(@PathParam("id") String id) {
    Validate.notNull(id);// w  w  w .  j  a v a  2 s  . c  o  m
    Validate.notEmpty(id);

    LOGGER.log(Level.FINE, "Invoking deleteCustomer, id={0}", id);

    long identifier = Long.parseLong(id);

    Response response;

    if (isCustomerExists(identifier)) {
        LOGGER.log(Level.FINE, "Specified customer exists, remove data, id={0}", id);
        customers.remove(identifier);
        LOGGER.log(Level.INFO, "Customer was removed successful, id={0}", id);
        response = Response.ok().build();
    } else {
        LOGGER.log(Level.SEVERE, "Specified customer does not exist, remove fail, id={0}", id);
        response = Response.notModified().build();
    }

    return response;
}