Problem with modifying Plugin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with modifying Plugin

z0mbi3
Hi,
I m new to nutch. I have been trying to understand the working of the opic scoring plugin but have certain issues:

I have added this line in opicScoring code:

public void injectedScore(UTF8 url, CrawlDatum datum) throws ScoringFilterException {
     if (LOG.isInfoEnabled()) {
      LOG.info("Seeds : Scored");
     }
    datum.setScore(scoreInjected);
  }

I compiled this by running ant in the base directory of nutch:

ant

It compiles succesfully and builds a jar
but when I run the crawler using :

bin/nutch crawl -urls dir -depth 2

this is the log that comes on console :
crawl started in: crawl-20070325024707
rootUrlDir = urls
threads = 10
depth = 2
Injector: starting - aks
Injector: crawlDb: crawl-20070325024707/crawldb
Injector: urlDir: urls
Injector: Converting injected urls to crawl db entries
Injector: Merging injected urls into crawl db.
Injector: done
Generator: starting
Generator: segment: crawl-20070325024707/segments/2007
Generator: Selecting best-scoring urls due for fetch.

Why dont i get the logging info added in the plugin by me on console??

Plz Help
Thank You.

Reply | Threaded
Open this post in threaded view
|

Re: Problem with modifying Plugin

Dennis Kubes
You would need to setup your logging configuration to include INFO in
the log4j.properties file in the conf directory.

Dennis Kubes

z0mbi3 wrote:

> Hi,
> I m new to nutch. I have been trying to understand the working of the opic
> scoring plugin but have certain issues:
>
> I have added this line in opicScoring code:
>
> public void injectedScore(UTF8 url, CrawlDatum datum) throws
> ScoringFilterException {
>      if (LOG.isInfoEnabled()) {
>       LOG.info("Seeds : Scored");
>      }
>     datum.setScore(scoreInjected);
>   }
>
> I compiled this by running ant in the base directory of nutch:
>
> ant
>
> It compiles succesfully and builds a jar
> but when I run the crawler using :
>
> bin/nutch crawl -urls dir -depth 2
>
> this is the log that comes on console :
> crawl started in: crawl-20070325024707
> rootUrlDir = urls
> threads = 10
> depth = 2
> Injector: starting - aks
> Injector: crawlDb: crawl-20070325024707/crawldb
> Injector: urlDir: urls
> Injector: Converting injected urls to crawl db entries
> Injector: Merging injected urls into crawl db.
> Injector: done
> Generator: starting
> Generator: segment: crawl-20070325024707/segments/2007
> Generator: Selecting best-scoring urls due for fetch.
>
> Why dont i get the logging info added in the plugin by me on console??
>
> Plz Help
> Thank You.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with modifying Plugin

z0mbi3
worked :)
Thanx a lot.
Dennis Kubes wrote
You would need to setup your logging configuration to include INFO in
the log4j.properties file in the conf directory.

Dennis Kubes

z0mbi3 wrote:
> Hi,
> I m new to nutch. I have been trying to understand the working of the opic
> scoring plugin but have certain issues:
>
> I have added this line in opicScoring code:
>
> public void injectedScore(UTF8 url, CrawlDatum datum) throws
> ScoringFilterException {
>      if (LOG.isInfoEnabled()) {
>       LOG.info("Seeds : Scored");
>      }
>     datum.setScore(scoreInjected);
>   }
>
> I compiled this by running ant in the base directory of nutch:
>
> ant
>
> It compiles succesfully and builds a jar
> but when I run the crawler using :
>
> bin/nutch crawl -urls dir -depth 2
>
> this is the log that comes on console :
> crawl started in: crawl-20070325024707
> rootUrlDir = urls
> threads = 10
> depth = 2
> Injector: starting - aks
> Injector: crawlDb: crawl-20070325024707/crawldb
> Injector: urlDir: urls
> Injector: Converting injected urls to crawl db entries
> Injector: Merging injected urls into crawl db.
> Injector: done
> Generator: starting
> Generator: segment: crawl-20070325024707/segments/2007
> Generator: Selecting best-scoring urls due for fetch.
>
> Why dont i get the logging info added in the plugin by me on console??
>
> Plz Help
> Thank You.
>
>