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:com.tupilabs.image_gallery.ImageGalleryRecorder.java

@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
        throws InterruptedException, IOException {
    listener.getLogger().append("Creating image galleries.");
    boolean r = true;
    for (ImageGallery imageGallery : this.imageGalleries) {
        try {//from w w  w  . j a v a2  s  .c  o  m
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.log(Level.FINE,
                        "Creating image gallery: " + imageGallery.getDescriptor().getDisplayName());
            }
            imageGallery.createImageGallery(build, listener);
        } catch (IOException ioe) {
            r = false;
            ioe.printStackTrace(listener.getLogger());
        } catch (InterruptedException ie) {
            r = false;
            ie.printStackTrace(listener.getLogger());
        }
    }
    return r;
}

From source file:eu.europa.ejusticeportal.dss.applet.model.service.FileSeeker.java

/**
 * Search for a library Path./*from w w  w.j  av a 2s. co  m*/
 * A library path can be configured with a wild card, similar to: "root/sub/filename.extension" where sub,
 * filename and extension can contain one ore more wildcard "*".
 * 
 * @param libraryPath the Library Path in which the search will be performed.
 * @return the set of files found.
 */
public Set<String> search(String libraryPath) {
    LOG.log(Level.FINE, "searching for library path: {0}", libraryPath);
    Set<String> result = new HashSet<String>();

    TokenizedLibraryPath tokenLibPath = new TokenizedLibraryPath();
    tokenLibPath.tokenize(libraryPath);
    LOG.log(Level.FINE, "tokenized={0}", tokenLibPath.toString());
    WildcardFileFilter fileFilter = new WildcardFileFilter(tokenLibPath.getFileName(), IOCase.INSENSITIVE);
    final File rootDir = new File(tokenLibPath.getRootDirPath());

    if (rootDir.exists()) {
        LOG.log(Level.FINE, "Existing root directory: {0}", rootDir.getAbsolutePath());
        final IOFileFilter dirFilter;
        if (tokenLibPath.getWildcardSubDirPath().isEmpty()) {
            dirFilter = null;
        } else {
            dirFilter = new WildcardDirectoryFilter(rootDir, tokenLibPath.getWildcardSubDirPath());
        }
        result.addAll(search(fileFilter, rootDir, dirFilter));
    }
    return result;
}

From source file:mendeley2kindle.KindleDAO.java

public void commit() throws IOException {
    File path = new File(kindleLocal);
    File file = new File(path, KINDLE_COLLECTIONS_JSON);
    log.log(Level.FINER, "writing collections data: " + file);
    if (!file.exists() || file.canWrite()) {
        file.getParentFile().mkdirs();//from   w w w  . ja  v  a 2 s.  c o  m
        FileWriter fw = new FileWriter(file);
        fw.write(collections.toString());
        fw.close();
        log.log(Level.FINE, "Saved kindle collections: " + file);
    } else {
        log.log(Level.SEVERE, "CANNOT write Kindle collections data. Aborting..." + file);
    }
}

From source file:de.crowdcode.kissmda.core.uml.UmlHelper.java

public void log(Object o) {
    logger.log(Level.FINE, o != null ? o.toString() : "<null>");
}

From source file:com.boundlessgeo.geoserver.api.controllers.MapController.java

@RequestMapping(value = "/{wsName}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.CREATED)//from w  w  w.  j  av  a 2 s . com
public @ResponseBody JSONObj create(@PathVariable String wsName, @RequestBody JSONObj obj) {
    String name = obj.str("name");
    String title = obj.str("title");
    String description = obj.str("abstract");

    String user = SecurityContextHolder.getContext().getAuthentication().getName();
    Date created = new Date();

    CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;
    if (obj.has("proj")) {
        String srs = obj.str("proj");
        try {
            crs = CRS.decode(srs);
        } catch (FactoryException e) {
            LOG.log(Level.FINE, wsName + "." + name + " unrecorgnized proj:" + srs, e);
        }
    }
    Envelope envelope = IO.bounds(obj.object("bbox"));
    ReferencedEnvelope bounds = new ReferencedEnvelope(envelope, crs);

    Catalog cat = geoServer.getCatalog();
    LayerGroupInfo map = cat.getFactory().createLayerGroup();
    map.setName(name);
    map.setAbstract(description);
    map.setTitle(title);
    map.setMode(Mode.SINGLE);
    map.setWorkspace(findWorkspace(wsName));
    map.setBounds(bounds);

    Metadata.created(map, created);
    Metadata.modified(map, created);

    cat.add(map);
    return mapDetails(new JSONObj(), map, wsName);
}

From source file:info.dolezel.jarss.rest.v1.ws.UnreadNotificationEndpoint.java

public static void pushMessage(User user, String message) {
    Set<Session> ss;// ww w.j av a 2  s .c o m

    synchronized (userSessions) {
        ss = new HashSet<>(userSessions.get(user));
    }

    for (Session s : ss) {
        try {
            s.getRemote().sendStringByFuture(message);
        } catch (Exception ex) {
            Logger.getLogger(UnreadNotificationEndpoint.class.getName()).log(Level.FINE,
                    "Cannot push notification to session " + s, ex);
        }
    }
}

From source file:net.chrissearle.flickrvote.web.vote.VoteAction.java

@Override
public void validate() {
    if (logger.isLoggable(Level.FINE)) {
        logger.fine("validate");
    }//from   w w  w.  ja  v a 2  s. c o m

    Set<ChallengeSummary> votingChallenges = challengeService.getChallengesByType(ChallengeType.VOTING);

    int voteCount = 5;

    if (votingChallenges.size() > 0) {
        ChallengeSummary challenge = votingChallenges.iterator().next();

        ChallengeItem challengeItem = photographyService.getChallengeImages(challenge.getTag());

        if (challengeItem.getImages().size() > 0) {
            if (challengeItem.getImages().size() <= voteCount) {
                voteCount = challengeItem.getImages().size();

                boolean seenPhotographer = false;

                Photographer photographer = (Photographer) session
                        .get(FlickrVoteWebConstants.FLICKR_USER_SESSION_KEY);

                for (ImageItem image : challengeItem.getImages()) {
                    if (image.getPhotographer().getName().equals(photographer.getPhotographerName())) {
                        seenPhotographer = true;

                        if (votes != null && votes.contains(image.getId())) {
                            addActionError(getText("vote.self.vote"));
                        }
                    }
                }

                if (seenPhotographer) {
                    voteCount--;
                }
            }

            if (votes == null || votes.size() == 0 || votes.size() > voteCount) {
                String[] params = new String[1];
                params[0] = "" + voteCount;

                addActionError(getText("vote.vote.count", params));
            }
        }
    }
}

From source file:at.bitfire.davdroid.syncadapter.CalendarSyncManager.java

@Override
protected RequestBody prepareUpload(LocalResource resource) throws IOException, CalendarStorageException {
    LocalEvent local = (LocalEvent) resource;
    App.log.log(Level.FINE, "Preparing upload of event " + local.getFileName(), local.getEvent());

    ByteArrayOutputStream os = new ByteArrayOutputStream();
    local.getEvent().write(os);/*from w ww  .  j a v  a  2 s.c  o m*/

    return RequestBody.create(DavCalendar.MIME_ICALENDAR, os.toByteArray());
}

From source file:maltcms.ui.nb.pipelineRunner.ui.MaltcmsLocalHostExecution.java

protected String locateMaltcmsJar(File baseDir) throws ConstraintViolationException {
    Logger.getLogger(MaltcmsLocalHostExecution.class.getName()).log(Level.FINE, "Checking files in dir: {0}",
            baseDir.getAbsolutePath());//w w  w .  j  av a2  s.co m
    File[] f = baseDir.listFiles(new FileFilter() {
        @Override
        public boolean accept(File file) {
            if (file.getName().toLowerCase().endsWith("jar")
                    && file.getName().toLowerCase().startsWith("maltcms")) {
                Logger.getLogger(MaltcmsLocalHostExecution.class.getName()).log(Level.FINE, "Found match: {0}",
                        file.getName());
                return true;
            }
            return false;
        }
    });
    if (f.length > 1) {
        throw new ConstraintViolationException(
                "Found more than one candidate for maltcms.jar in base directory: "
                        + baseDir.getAbsolutePath());
    }
    return f[0].getName();
}

From source file:com.symbian.driver.remoting.master.QueuedExecutor.java

/**
 * Terminate/remove a waiting job from the executor's queue.
 * /*www .j ava  2s .  c o m*/
 * @param aTestJobId
 *            int: a job id
 * @return a reference to the testjob removed/terminated or null if there no
 *         such job.
 */
public TestJob removeJob(int aTestJobId) {
    synchronized (testJobQueue) {
        for (Iterator<TestJob> iter = testJobQueue.iterator(); iter.hasNext();) {
            TestJob testJob = iter.next();
            if (testJob.getId() == aTestJobId) {
                testJob.setState(TestJob.TERMINATED);
                JobTracker.add(testJob.getId(), testJob.getState());
                iter.remove();
                takeSnapshot();
                JobTracker.getInstance().takeSnapshot();
                LOGGER.log(Level.FINE, "Master: Removed job " + testJob.getId() + " from the Queue.");
                return testJob;
            }
        }
        return null;
    }
}