English 中文(简体)
• 如何记录执行一种营养素粉
原标题:How to log execution of a nutch plugin

我在努力建立习惯:nutch,有特殊要求。

我发现我在<代码>hadoop.log/code>中提及的 p,但并不相关。

我在我的代码的不同地方添加了LOG.debug(“test”LOG.info(“test2”),我在log4j.properties上写道:

# Logging for development
log4j.logger.org.apache.nutch.parse.html=DEBUG

我的问题是:我能从哪里找到这些信息,我已经检查了<条码>hadoop.log,但我无法找到任何东西?

我如何记录/追踪我的java法典? (不使用ec)

增 编

最佳回答

如果贵粉碎物有Variable类别

public static final Log LOG = LogFactory.getLog(YourClass.class
        .getName());

你们所称的方法是:

LOG.info("Your Logmessage");

And you have built your plugin and configured that Nutch uses your plugin when fetching/crawling/... then the message is logged in the hadoop.log.

当你建造Nutch时,它是否说它正在建设你的花样?

如果是的话,你可以检查您的原始组合,该组合部署在NutchHome/runtime/ local/conf/nutch-site.xml:

<property>
<name>plugin.includes</name>
<value>protocol-http|urlfilter-regex|parse-(html)|yourplugin</value>
<description>The plugins which are used in every crawl ordered by call-  order</description>
</property>

If your plugin is configured in the runtime environment. If not change the configfile an rebuild Nutch. If that doesn t help, you can give me some more information.

问题回答

由本法典解决

 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 public static final Logger LOG = LoggerFactory.getLogger("org.apache.nutch.parse.html");




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签