summaryrefslogtreecommitdiff
path: root/navit/search.c
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-11-22 22:36:24 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-11-22 22:36:24 +0000
commit15ed93bca6e29fafab036c05ea77c163ab2baebf (patch)
tree0118c6ec64520748c7daefd46e57c226343621d2 /navit/search.c
parent3f996b10edb6dfd66c7bbbc9c8f5447978c52600 (diff)
downloadnavit-svn-15ed93bca6e29fafab036c05ea77c163ab2baebf.tar.gz
Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5967 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/search.c')
-rw-r--r--navit/search.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/navit/search.c b/navit/search.c
index 17418b16..139feef5 100644
--- a/navit/search.c
+++ b/navit/search.c
@@ -225,10 +225,10 @@ search_phrase_used(struct phrase *p, GList *used_phrases)
{
while (used_phrases) {
struct phrase *pu=used_phrases->data;
- dbg(lvl_warning,"'%s'-'%s' vs '%s'-'%s'\n",p->start,p->end,pu->start,pu->end);
+ dbg(lvl_debug,"'%s'-'%s' vs '%s'-'%s'\n",p->start,p->end,pu->start,pu->end);
if (p->start < pu->end && p->end > pu->start)
return 1;
- dbg(lvl_warning,"unused\n");
+ dbg(lvl_debug,"unused\n");
used_phrases=g_list_next(used_phrases);
}
return 0;
@@ -255,7 +255,7 @@ search_by_address_attr(GList *results, struct search_list *sl, GList *phrases, G
int count=0,wordcount_all=wordcount+p->wordcount;
struct search_list_result *slr;
attr.u.str=search_phrase_str(p);
- dbg(lvl_warning,"%s phrase '%s'\n",attr_to_name(attr_type),attr.u.str);
+ dbg(lvl_debug,"%s phrase '%s'\n",attr_to_name(attr_type),attr.u.str);
search_list_search(sl, &attr, 0);
while ((slr=search_list_get_result(sl))) {
if (attr_type != attr_country_all) {
@@ -265,7 +265,7 @@ search_by_address_attr(GList *results, struct search_list *sl, GList *phrases, G
}
count++;
}
- dbg(lvl_warning,"%d results wordcount %d\n",count,wordcount_all);
+ dbg(lvl_debug,"%d results wordcount %d\n",count,wordcount_all);
if (count) {
GList *used=g_list_prepend(g_list_copy(exclude), tmp->data);
enum attr_type new_attr_type=attr_none;
@@ -392,7 +392,7 @@ search_list_select(struct search_list *this_, enum attr_type attr_type, int id,
curr=le->list;
if (mode > 0 || !id)
le->selected=mode;
- //dbg(lvl_error,"enter level=%d %d %d %p\n", level, id, mode, curr);
+ //dbg(lvl_debug,"enter level=%d %d %d %p\n", level, id, mode, curr);
num = 0;
while (curr) {
num++;
@@ -401,13 +401,13 @@ search_list_select(struct search_list *this_, enum attr_type attr_type, int id,
slc->selected=mode;
if (id) {
le->last=curr;
- //dbg(lvl_error,"found\n");
+ //dbg(lvl_debug,"found\n");
return slc;
}
}
curr=g_list_next(curr);
}
- //dbg(lvl_error,"not found\n");
+ //dbg(lvl_debug,"not found\n");
return NULL;
}
@@ -566,7 +566,7 @@ search_list_town_new(struct item *item)
ret->itemt=*item;
ret->common.item=ret->common.unique=*item;
if (item_attr_get(item, attr_town_streets_item, &attr)) {
- dbg(lvl_warning,"town_assoc 0x%x 0x%x\n", attr.u.item->id_hi, attr.u.item->id_lo);
+ dbg(lvl_debug,"town_assoc 0x%x 0x%x\n", attr.u.item->id_hi, attr.u.item->id_lo);
ret->common.unique=*attr.u.item;
}
search_list_common_new(item, &ret->common);
@@ -760,7 +760,7 @@ search_postal_merge(char *mask, char *new)
{
int i;
char *ret=NULL;
- dbg(lvl_warning,"enter %s %s\n", mask, new);
+ dbg(lvl_debug,"enter %s %s\n", mask, new);
if (!new)
return NULL;
if (!mask)
@@ -777,7 +777,7 @@ search_postal_merge(char *mask, char *new)
while (mask[i])
ret[i++]='.';
}
- dbg(lvl_warning,"merged %s with %s as %s\n", mask, new, ret);
+ dbg(lvl_debug,"merged %s with %s as %s\n", mask, new, ret);
return ret;
}
@@ -861,24 +861,24 @@ search_list_get_result(struct search_list *this_)
return ret;
}
- //dbg(lvl_error,"enter\n");
+ //dbg(lvl_debug,"enter\n");
le=&this_->levels[level];
- //dbg(lvl_error,"le=%p\n", le);
+ //dbg(lvl_debug,"le=%p\n", le);
for (;;)
{
- //dbg(lvl_error,"le->search=%p\n", le->search);
+ //dbg(lvl_debug,"le->search=%p\n", le->search);
if (! le->search)
{
- //dbg(lvl_error,"partial=%d level=%d\n", le->partial, level);
+ //dbg(lvl_debug,"partial=%d level=%d\n", le->partial, level);
if (! level)
le->parent=NULL;
else
{
leu=&this_->levels[level-1];
- //dbg(lvl_error,"leu->curr=%p\n", leu->curr);
+ //dbg(lvl_debug,"leu->curr=%p\n", leu->curr);
for (;;)
{
- //dbg(lvl_error,"*********########");
+ //dbg(lvl_debug,"*********########");
struct search_list_common *slc;
if (! leu->curr)
@@ -897,23 +897,23 @@ search_list_get_result(struct search_list *this_)
}
if (le->parent)
{
- //dbg(lvl_error,"mapset_search_new with item(%d,%d)\n", le->parent->item.id_hi, le->parent->item.id_lo);
+ //dbg(lvl_debug,"mapset_search_new with item(%d,%d)\n", le->parent->item.id_hi, le->parent->item.id_lo);
}
- //dbg(lvl_error,"############## attr=%s\n", attr_to_name(le->attr->type));
+ //dbg(lvl_debug,"############## attr=%s\n", attr_to_name(le->attr->type));
le->search=mapset_search_new(this_->ms, &le->parent->item, le->attr, le->partial);
le->hash=g_hash_table_new(search_item_hash_hash, search_item_hash_equal);
}
- //dbg(lvl_error,"le->search=%p\n", le->search);
+ //dbg(lvl_debug,"le->search=%p\n", le->search);
if (!this_->item)
{
- //dbg(lvl_error,"sssss 1");
+ //dbg(lvl_debug,"sssss 1");
this_->item=mapset_search_get_item(le->search);
- //dbg(lvl_error,"sssss 1 %p\n",this_->item);
+ //dbg(lvl_debug,"sssss 1 %p\n",this_->item);
}
if (this_->item)
{
void *p=NULL;
- //dbg(lvl_error,"id_hi=%d id_lo=%d\n", this_->item->id_hi, this_->item->id_lo);
+ //dbg(lvl_debug,"id_hi=%d id_lo=%d\n", this_->item->id_hi, this_->item->id_lo);
if (this_->postal)
{
struct attr postal;
@@ -929,11 +929,11 @@ search_list_get_result(struct search_list *this_)
this_->result.town=NULL;
this_->result.street=NULL;
this_->result.c=NULL;
- //dbg(lvl_error,"case x LEVEL start %d\n",level);
+ //dbg(lvl_debug,"case x LEVEL start %d\n",level);
switch (level)
{
case 0:
- //dbg(lvl_error,"case 0 COUNTRY");
+ //dbg(lvl_debug,"case 0 COUNTRY");
p=search_list_country_new(this_->item);
this_->result.country=p;
this_->result.country->common.parent=NULL;
@@ -943,7 +943,7 @@ search_list_get_result(struct search_list *this_)
this_->item=NULL;
break;
case 1:
- //dbg(lvl_error,"case 1 TOWN");
+ //dbg(lvl_debug,"case 1 TOWN");
p=search_list_town_new(this_->item);
this_->result.town=p;
this_->result.town->common.parent=this_->levels[0].last->data;
@@ -954,7 +954,7 @@ search_list_get_result(struct search_list *this_)
this_->item=NULL;
break;
case 2:
- //dbg(lvl_error,"case 2 STREET");
+ //dbg(lvl_debug,"case 2 STREET");
p=search_list_street_new(this_->item);
this_->result.street=p;
this_->result.street->common.parent=this_->levels[1].last->data;
@@ -965,13 +965,13 @@ search_list_get_result(struct search_list *this_)
this_->item=NULL;
break;
case 3:
- dbg(lvl_warning,"case 3 HOUSENUMBER\n");
+ dbg(lvl_debug,"case 3 HOUSENUMBER\n");
has_street_name=0;
// if this housenumber has a streetname tag, set the name now
if (item_attr_get(this_->item, attr_street_name, &attr2))
{
- dbg(lvl_warning,"streetname: %s\n",attr2.u.str);
+ dbg(lvl_debug,"streetname: %s\n",attr2.u.str);
has_street_name=1;
}
@@ -988,7 +988,7 @@ search_list_get_result(struct search_list *this_)
{
this_->item=NULL;
} else {
- dbg(lvl_error,"interpolation!\n");
+ dbg(lvl_debug,"interpolation!\n");
}
if(le->parent && has_street_name) {