當前位置: 首頁>>代碼示例>>Java>>正文


Java Log.debug方法代碼示例

本文整理匯總了Java中org.jfree.util.Log.debug方法的典型用法代碼示例。如果您正苦於以下問題:Java Log.debug方法的具體用法?Java Log.debug怎麽用?Java Log.debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.util.Log的用法示例。


在下文中一共展示了Log.debug方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: load

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Loads all modules mentioned in the report configuration starting with
 * the given prefix. This method is used during the boot process of
 * JFreeReport. You should never need to call this method directly.
 *
 * @param modulePrefix the module prefix.
 */
public void load(final String modulePrefix) {
    if (this.initSections.contains(modulePrefix)) {
        return;
    }
    this.initSections.add(modulePrefix);

    final Configuration config = this.booter.getGlobalConfig();
    final Iterator it = config.findPropertyKeys(modulePrefix);
    int count = 0;
    while (it.hasNext()) {
        final String key = (String) it.next();
        if (key.endsWith(".Module")) {
            final String moduleClass = config.getConfigProperty(key);
            if (moduleClass != null && moduleClass.length() > 0) {
                addModule(moduleClass);
                count++;
            }
        }
    }
    Log.debug("Loaded a total of " + count + " modules under prefix: " + modulePrefix);
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:29,代碼來源:PackageManager.java

示例2: getParser

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Returns a SAX parser.
 *
 * @return a SAXParser.
 *
 * @throws ParserConfigurationException if there is a problem configuring the parser.
 * @throws SAXException if there is a problem with the parser initialisation
 */
protected SAXParser getParser() throws ParserConfigurationException, SAXException {
    if (this.factory == null) {
        this.factory = SAXParserFactory.newInstance();
        if (isValidateDTD()) {
            try {
                // dont touch the validating feature, if not needed ..
                this.factory.setValidating(true);
            }
            catch (Exception ex) {
                // the parser does not like the idea of validating ...
                Log.debug("The parser will not validate the xml document.", ex);
            }
        }
    }
    return this.factory.newSAXParser();
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:25,代碼來源:ParserFrontend.java

示例3: getTfsIssue

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Gets the issue from TFS after parsing the ID.
 * @param issueId The issue ID as a string
 * @param host The TFS collection URL
 * @param credentials The credentials needed to connect to TFS.
 * @return The issue data if located.
 * @throws Exception Thrown if the issue could not be located.
 */
@NotNull
private IssueData getTfsIssue(@NotNull String issueId, @NotNull String host, @Nullable Credentials credentials)
        throws Exception {

    Log.debug(String.format("Getting issue from issue fetcher: %s", issueId));

    try {

        int issueNumber = parseIssueId(issueId);

        IssueData issueData = this.tfsDataProvider.getIssueById(issueNumber, host, credentials);
        if (issueData == null) {
            throw new Exception("Could not find issue in TFS Id: " + issueId);
        }

        return issueData;
    }
    catch (Exception ex) {
        LOG.error("Cannot get issue: " + issueId);
        LOG.error(ex);

        throw ex;
    }
}
 
開發者ID:dpiessens,項目名稱:tfs-worktiem-plugin,代碼行數:33,代碼來源:TfsIssueFetcher.java

示例4: load

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Loads the properties stored in the given file. This method does nothing if
 * the file does not exist or is unreadable. Appends the contents of the loaded
 * properties to the already stored contents.
 *
 * @param resourceName the file name of the stored properties.
 * @param resourceSource ?
 */
public void load(final String resourceName, final Class resourceSource)
{
  final InputStream in = ObjectUtilities.getResourceRelativeAsStream
          (resourceName, resourceSource);
  if (in != null)
  {
    try
    {
      load(in);
    }
    finally
    {
      try
      {
        in.close();
      }
      catch (IOException e)
      {
        // ignore
      }
    }
  }
  else
  {
    Log.debug ("Configuration file not found in the classpath: " + resourceName);
  }

}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:37,代碼來源:PropertyFileConfiguration.java

示例5: prune

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Removes any class descriptions that are not fully defined.
 */
public void prune() {
    final ClassDescription[] cds = (ClassDescription[]) this.classes.toArray(new ClassDescription[0]);
    for (int i = 0; i < cds.length; i++) {
        if (cds[i].isUndefined()) {
            removeClassDescription(cds[i]);
            Log.debug("Pruned: " + cds[i].getName());
        }
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:13,代碼來源:DescriptionModel.java

示例6: addIgnoredBaseClass

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Adds a base class that should be ignored.
 * 
 * @param baseClass  the base class name.
 */
public void addIgnoredBaseClass(final String baseClass) {
    final Class loadedClass = loadClass(baseClass);
    if (loadedClass != null) {
        Log.debug (new Log.SimpleMessage("Added IgnClass: " , baseClass));
        this.ignoredBaseClasses.add(loadedClass);
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:13,代碼來源:JavaSourceCollector.java

示例7: collectFiles

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Collects the files/classes.
 * 
 * @param directory  the starting directory.
 * @param packageName  the initial package name.
 */
protected void collectFiles(final File directory, final String packageName) {
    final File[] files = directory.listFiles(this.eff);
    for (int i = 0; i < files.length; i++) {
        if (files[i].isDirectory()) {
            collectFiles(files[i], buildJavaName(packageName, files[i].getName()));
        }
        else {
            final String fname = files[i].getName();
            final String className = fname.substring(0, fname.length() - 5);
            final String fullName = buildJavaName(packageName, className);
            if (isIgnoredPackage(fullName)) {
                Log.debug (new Log.SimpleMessage("Do not process: Ignored: ", className));
                continue;
            }
            final Class jclass = loadClass(fullName);
            if (jclass == null || isIgnoredBaseClass(jclass)) {
                continue;
            }
            if (jclass.isInterface() || Modifier.isAbstract(jclass.getModifiers())) {
                Log.debug (new Log.SimpleMessage("Do not process: Abstract: ", className));
                continue;
            }
            if (!Modifier.isPublic(jclass.getModifiers())) {
                Log.debug (new Log.SimpleMessage("Do not process: Not public: ", className));
                continue;
            }
            this.fileList.add(jclass);
        }
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:37,代碼來源:JavaSourceCollector.java

示例8: main

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
     * Runs the generator, using the 'generator.properties' file for configuration info.
     * 
     * @param args  command line arguments.
     * 
     * @throws Exception if something goes wrong!
     */
    public static void main(final String[] args) throws Exception {

        Log.getInstance().addTarget(new PrintStreamLogTarget());
        
        URL propertyURL = ObjectUtilities.getResourceRelative
                ("generator.properties", DescriptionGenerator.class);
        if (args.length > 0) {
            final File f = new File(args[0]);
            propertyURL = f.toURL();
        }
        final Properties p = loadProperties(propertyURL);

        final String handlerSource = p.getProperty("attributedefinition");
        if (handlerSource != null) {
            final Properties handlers = loadProperties(new URL(propertyURL, handlerSource));
            ModelBuilder.getInstance().addAttributeHandlers(handlers);
        }

        final String source = p.getProperty("sourcedirectory", ".");
        final String target = p.getProperty("targetfile", "model.xml");
        DescriptionModel model = null;
        try {
            model = new DefaultModelReader().load(target);
        }
        catch (Exception e) {
            Log.debug("Unable to load default model. Ignoring...");
        }
//        Log.debug (model.getModelComments());
        model = generate(source, p, model);
        model.prune();
        writeMultiFile(target, model);
        System.exit(0);
    }
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:41,代碼來源:DescriptionGenerator.java

示例9: writeSingleFile

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Writes the class description model to a single file.
 * 
 * @param target  the target file name.
 * @param model  the class description model.
 * 
 * @throws IOException if there is an I/O problem.
 */
public static void writeSingleFile(final String target, final DescriptionModel model) throws IOException {
    Log.debug ("Writing ...");
    final ModelWriter writer = new ModelWriter();
    writer.setModel(model);
    final Writer w = new BufferedWriter(new FileWriter(target));
    writer.write(w);
    w.close();
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:17,代碼來源:DescriptionGenerator.java

示例10: configureReader

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Configures the xml reader. Use this to set features or properties
 * before the documents get parsed.
 *
 * @param handler the parser implementation that will handle the SAX-Callbacks.
 * @param reader the xml reader that should be configured.
 */
protected void configureReader(final XMLReader reader, final FrontendDefaultHandler handler) {
    try {
        reader.setProperty
            ("http://xml.org/sax/properties/lexical-handler", handler.getCommentHandler());
    }
    catch (SAXException se) {
        Log.debug("Comments are not supported by this SAX implementation.");
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:17,代碼來源:ParserFrontend.java

示例11: parseXmlDocument

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Parses the given specification and loads all includes specified in the files.
 * This implementation does not check for loops in the include files.
 *
 * @param resource  the url of the xml specification.
 * @param isInclude  an include?
 * 
 * @throws org.jfree.xml.util.ObjectDescriptionException if an error occured which prevented the
 * loading of the specifications.
 */
protected void parseXmlDocument(final URL resource, final boolean isInclude)
    throws ObjectDescriptionException {
    
    try {
        final InputStream in = new BufferedInputStream(resource.openStream());
        final SAXParserFactory factory = SAXParserFactory.newInstance();
        final SAXParser saxParser = factory.newSAXParser();
        final XMLReader reader = saxParser.getXMLReader();

        final SAXModelHandler handler = new SAXModelHandler(resource, isInclude);
        try {
            reader.setProperty
                ("http://xml.org/sax/properties/lexical-handler",
                    getCommentHandler());
        }
        catch (SAXException se) {
            Log.debug("Comments are not supported by this SAX implementation.");
        }
        reader.setContentHandler(handler);
        reader.setDTDHandler(handler);
        reader.setErrorHandler(handler);
        reader.parse(new InputSource(in));
        in.close();
    }
    catch (Exception e) {
        // unable to init
        Log.warn("Unable to load factory specifications", e);
        throw new ObjectDescriptionException("Unable to load object factory specs.", e);
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:41,代碼來源:AbstractModelReader.java

示例12: toAttributeValue

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Converts the attribute to a string.
 *
 * @param o  the attribute ({@link Integer} expected).
 * 
 * @return A string representing the integer value.
 */
public String toAttributeValue(final Object o) {
    try {
        final Integer in = (Integer) o;
        return in.toString();
    }
    catch (ClassCastException cce) {
        if (o != null) {
            Log.debug("ClassCastException: Expected Integer, found " + o.getClass());
        }
        throw cce;
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:20,代碼來源:IntegerAttributeHandler.java

示例13: propertyChange

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * This method gets called when a bound property is changed.
 *
 * @param evt A PropertyChangeEvent object describing the event source
 *            and the property that has changed.
 */
public void propertyChange(final PropertyChangeEvent evt) {
    if (evt.getPropertyName().equals("enabled") == false) {
        Log.debug ("PropertyName");
        return;
    }
    if (evt.getSource() instanceof RootEditor == false) {
        Log.debug ("Source");
        return;
    }
    final RootEditor editor = (RootEditor) evt.getSource();
    updateRootEditorEnabled(editor);
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:19,代碼來源:AbstractTabbedUI.java

示例14: solveWithGirvanNewman

import org.jfree.util.Log; //導入方法依賴的package包/類
SolverResult solveWithGirvanNewman(final int numberOfClusters) {
	Log.debug("solve cluster with numberOfClusters = " + numberOfClusters);
	GirvanNewmanClusterer clusterer = new GirvanNewmanClusterer();
	clusterer.setPreferredNumberOfClusters(numberOfClusters);
	clusterer.execute(graphModel);
	SolverResult solverResult = new SolverResult(getClustererResult(clusterer));
	return solverResult;
}
 
開發者ID:ServiceCutter,項目名稱:ServiceCutter,代碼行數:9,代碼來源:GephiSolver.java

示例15: getIssues

import org.jfree.util.Log; //導入方法依賴的package包/類
/**
 * Gets the data related to a specific work item.
 * @param ids The ID collection of the issue to get.
 * @param host The TFS host URL
 * @param credentials The credentials needed to access TFS.
 * @throws com.microsoft.tfs.core.httpclient.auth.InvalidCredentialsException Thrown if we cannot connect to the server.
 * @return The work item data of the items that could be located.
 */
@NotNull
public Collection<IssueData> getIssues(@NotNull Collection<Integer> ids, @NotNull String host, @Nullable Credentials credentials)
        throws InvalidCredentialsException {

    TFSTeamProjectCollection collection = null;
    WorkItemClient client = null;

    try {
        collection = getProjectCollection(host, credentials);
        client = collection.getWorkItemClient();

        Collection<IssueData> issues = new ArrayList<IssueData>();
        for (Integer id: ids) {

            Log.debug(String.format("Getting work item %d from TFS in batch", id));
            issues.add(getIssueById(id, collection, client));
        }

        return issues;
    }
    finally {

        if (client != null) {
            client.close();
        }

        if (collection != null) {
            collection.close();
        }
    }
}
 
開發者ID:dpiessens,項目名稱:tfs-worktiem-plugin,代碼行數:40,代碼來源:TfsJavaDataProvider.java


注:本文中的org.jfree.util.Log.debug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。