yacy/yacy_search_server

Feature request: Separate crawl and peer logs

okybaca opened this issue · 2 comments

When debugging behavior of YaCy and hunting the errors, it's very difficult to keep a track of them because the logfile is cluttered with all the common run information such as indexing and peer pings. If something happened last night, sometimes the log rotated already and is not possible to find the place, when error happened.

The optimal solution would be separating all the p2p info (peerpingg, index-transfers...) in one log and the indexing info in the another, so only important messages would be kept in yacyXX.log.

I understand that ConcurrentLog does the job, and that messages are already categorised somehow. Is it prepared for such solution? Is there an easy way to do that?

Mentioned also in #414.

I'm trying to understand the logging system, with the aim to clean it up a little and prepare for optional log category separation (separate log for crawling/indexing, peer information and RWI).

I'd clean it up in the source, but I don't want to go against @Orbiter s original intentions.

When going through logs and source code I understand that log messages are categorized somehow, with categories written in uppercase such as DHT, CRAWLER, SEARCH...
Some of them are lower-case names of functions (such as HeapReader, HeapWriter...) and don't have a "uppercase" category.
What is the strategy of naming the log entries and what is the desired system?
I propose RWI entries (/net/yacy/kelondro/rwi/) should have it's own category RWI and PEER or NETWORK related messages should have category NETWORK.

Some of the entries are marked with dot notation PROXY.access, is that a desired way, how to sub-categorize the entries? (eg. RWI.HeapReader).

Then, I don't know, what exactly Kelondro is. Is that just name of a library? Name of data structure of saved RWIs? Should it be used as a log keyword? I was unsure about that as well, when writing part of documentation.

The only way to separate the log would be the keywords you mentioned. Just use those words to grep for the wanted lines or put the word into the filter field in /ViewLog_p.html