27 case 1: str =
"Less than";
break;
28 case 2: str =
"Less than or equal";
break;
29 case 3: str =
"Equal";
break;
30 case 4: str =
"Greater or equal";
break;
31 case 5: str =
"Greater than";
break;
32 case 6: str =
"Not equal";
break;
33 case 100: str =
"Phonetic";
break;
34 case 101: str =
"Stem";
break;
35 case 102: str =
"Relevance";
break;
36 case 103: str =
"AlwaysMatches";
break;
163 yaz_snprintf(str, sz,
"completeness=Incomplete subfield");
166 yaz_snprintf(str, sz,
"completeness=Complete subfield");
187 const Odr_oid *ast,
int loglevel)
193 for (of = 0; of < num_attributes; of++)
196 const char *attset_name = 0;
206 switch (element->
which)
210 *element->
value.numeric, str,
sizeof str);
211 yaz_log(loglevel,
"%*.0s%s %s", depth,
"", attset_name, str);
217 for (i = 0; i<element->
value.complex->num_list; i++)
221 yaz_log(loglevel,
"%*.0s string: '%s'", depth,
"",
222 element->
value.complex->list[i]->u.string);
223 else if (element->
value.complex->list[i]->
which ==
227 *element->
value.complex->list[i]->u.numeric);
231 yaz_log(loglevel,
"%.*s%s attribute unknown",
232 depth,
"", attset_name);
250 return "unknown complex operator";
265 const Odr_oid *ast,
int loglevel)
281 depth,
"", op->
u.prox->exclusion ?
282 (*op->
u.prox->exclusion ?
"T" :
"F") :
"N",
283 *op->
u.prox->distance,
284 *op->
u.prox->ordered ?
"T" :
"F",
289 yaz_log(loglevel,
"%*.0s unknown complex", depth,
"");
304 yaz_log(loglevel,
"%*.0s term '%.*s' (general)", depth,
"",
305 zapt->
term->
u.general->len,
306 zapt->
term->
u.general->buf);
309 yaz_log(loglevel,
"%*.0s term '%s' (string)", depth,
"",
310 zapt->
term->
u.characterString);
314 "' (numeric)", depth,
"",
315 *zapt->
term->
u.numeric);
318 yaz_log(loglevel,
"%*.0s term (null)", depth,
"");
321 yaz_log(loglevel,
"%*.0s term (not general)", depth,
"");
327 yaz_log(loglevel,
"%*.0s set '%s'", depth,
"",
328 zs->
u.simple->
u.resultSetId);
331 yaz_log(loglevel,
"%*.0s unknown simple structure", depth,
"");
334 yaz_log(loglevel,
"%*.0s unknown structure", depth,
"");
355 yaz_log(loglevel,
"%*.0s term '%.*s' (general)", depth,
"",
356 zapt->
term->
u.general->len, zapt->
term->
u.general->buf);
359 yaz_log(loglevel,
"%*.0s term (not general)", depth,
"");
378 yaz_log(loglevel,
"CCL: %.*s", q->
u.type_2->len, q->
u.type_2->buf);
381 yaz_log(loglevel,
"Z39.58: %.*s", q->
u.type_100->len,
386 yaz_log(loglevel,
"CQL: %s", q->
u.type_104->
u.cql);
void yaz_log(int level, const char *fmt,...)
Writes log message.
#define YLOG_LOG
log level: log (regular)
static void attrStr(Odr_int type, Odr_int value, char *str, size_t sz)
void yaz_log_zquery(Z_Query *q)
void log_scan_term_level(int loglevel, Z_AttributesPlusTerm *zapt, const Odr_oid *ast)
void log_rpn_query(Z_RPNQuery *rpn)
void log_rpn_query_level(int loglevel, Z_RPNQuery *rpn)
void yaz_log_zquery_level(int loglevel, Z_Query *q)
static const char * relToStr(Odr_int v)
void log_scan_term(Z_AttributesPlusTerm *zapt, const Odr_oid *ast)
const char * yaz_prox_unit_name(Z_ProximityOperator *op)
static char * complex_op_name(Z_Operator *op)
static void zlog_attributes(Z_AttributesPlusTerm *t, int depth, const Odr_oid *ast, int loglevel)
static void zlog_structure(Z_RPNStructure *zs, int depth, const Odr_oid *ast, int loglevel)
Header for Z39.50 Query Printing.
const char * yaz_oid_to_string_buf(const Odr_oid *oid, oid_class *oclass, char *buf)
maps any OID to string (named or dot-notation)
const char * z_ProxUnit_to_str(int u)
converts prox unit integer to string
Header for JSON functions.
void yaz_snprintf(char *buf, size_t size, const char *fmt,...)
Header for config file reading utilities.
Z_AttributeSetId * attributeSet
union Z_AttributeElement::@260252174261265367116362007076255375270002041323 value
Z_AttributeElement ** attributes
Z_AttributeList * attributes
union Z_Operator::@171225215357037113014354143242105145344254361002 u
union Z_ProximityOperator::@031336250334025346341060256205106006053041305237 u
union Z_Query::@270220245041066023256025363242165325012357336235 u
Z_AttributeSetId * attributeSetId
Z_RPNStructure * RPNStructure
union Z_RPNStructure::@272042053041255367154306203353273370010236313243 u
union Z_Term::@023217361022206241314262227377164117366363003164 u
#define Z_AttributeValue_numeric
#define Z_Operator_and_not
#define Z_Term_characterString
#define Z_StringOrNumeric_numeric
#define Z_ProximityOperator_known
#define Z_AttributeValue_complex
#define Z_StringOrNumeric_string
#define Z_Operand_resultSetId
#define Z_RPNStructure_complex
#define Z_RPNStructure_simple