Possible compatibility problems with earlier versions marked with '*'.
+* Added prefix "yaz_" for the functions log_init.., log_file.. and
+log_mask_str. This was done to avoid name conflicts with other
+libraries (say other PHP extensions).
+
Added raw OID member for preferred record syntax (request_format_raw)
and returned record syntax (output_format_raw) for backend fetch method.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: client.c,v $
- * Revision 1.103 2000-08-10 08:41:26 adam
+ * Revision 1.104 2000-09-04 08:58:15 adam
+ * Added prefix yaz_ for most logging utility functions.
+ *
+ * Revision 1.103 2000/08/10 08:41:26 adam
* Fixes for ILL.
*
* Revision 1.102 2000/05/18 11:57:04 adam
apdu_file=fopen(arg, "a");
break;
case 'v':
- log_init (log_mask_str(arg), "", NULL);
+ yaz_log_init (yaz_log_mask_str(arg), "", NULL);
break;
default:
fprintf (stderr, "Usage: %s [-m <marclog>] [ -a <apdulog>] "
* OF THIS SOFTWARE.
*
* $Log: log.h,v $
- * Revision 1.3 2000-06-09 13:51:01 ian
+ * Revision 1.4 2000-09-04 08:58:15 adam
+ * Added prefix yaz_ for most logging utility functions.
+ *
+ * Revision 1.3 2000/06/09 13:51:01 ian
* Added LOG_APP for logging application (Rather than code) events that might
* be useful when creating usage reports.
*
#define logf yaz_log
-YAZ_EXPORT void log_init(int level, const char *prefix, const char *name);
-YAZ_EXPORT void log_init_file (const char *fname);
-YAZ_EXPORT void log_init_level (int level);
-YAZ_EXPORT void log_init_prefix (const char *prefix);
+YAZ_EXPORT void yaz_log_init(int level, const char *prefix, const char *name);
+YAZ_EXPORT void yaz_log_init_file (const char *fname);
+YAZ_EXPORT void yaz_log_init_level (int level);
+YAZ_EXPORT void yaz_log_init_prefix (const char *prefix);
YAZ_EXPORT void yaz_log(int level, const char *fmt, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
-YAZ_EXPORT int log_mask_str (const char *str);
-YAZ_EXPORT int log_mask_str_x (const char *str, int level);
-YAZ_EXPORT FILE *log_file(void);
+YAZ_EXPORT int yaz_log_mask_str (const char *str);
+YAZ_EXPORT int yaz_log_mask_str_x (const char *str, int level);
+YAZ_EXPORT FILE *yaz_log_file(void);
YAZ_EXPORT void log_event_start (void (*func)(int level, const char *msg, void *info),
void *info);
* See the file LICENSE for details.
*
* $Log: seshigh.c,v $
- * Revision 1.107 2000-08-31 10:20:12 adam
+ * Revision 1.108 2000-09-04 08:58:15 adam
+ * Added prefix yaz_ for most logging utility functions.
+ *
+ * Revision 1.107 2000/08/31 10:20:12 adam
* Added member request_format and output_format for backend fetch method.
*
* Revision 1.106 2000/08/31 09:51:25 adam
odr_errmsg(odr_geterror(assoc->decode)),
odr_offset(assoc->decode));
yaz_log(LOG_LOG, "PDU dump:");
- odr_dumpBER(log_file(), assoc->input_buffer, res);
+ odr_dumpBER(yaz_log_file(), assoc->input_buffer, res);
do_close(assoc, Z_Close_protocolError, "Malformed package");
return;
}
* Chas Woodfield, Fretwell Downing Informatics.
*
* $Log: statserv.c,v $
- * Revision 1.64 2000-04-05 07:39:55 adam
+ * Revision 1.65 2000-09-04 08:58:15 adam
+ * Added prefix yaz_ for most logging utility functions.
+ *
+ * Revision 1.64 2000/04/05 07:39:55 adam
* Added shared library support (libtool).
*
* Revision 1.63 2000/03/20 19:06:25 adam
}
}
sprintf(nbuf, "%s(%d)", me, getpid());
- log_init(control_block.loglevel, nbuf, 0);
+ yaz_log_init(control_block.loglevel, nbuf, 0);
}
else /* parent */
{
break;
case 'l':
strcpy(control_block.logfile, arg ? arg : "");
- log_init(control_block.loglevel, me, control_block.logfile);
+ yaz_log_init(control_block.loglevel, me, control_block.logfile);
break;
case 'v':
- control_block.loglevel = log_mask_str(arg);
- log_init(control_block.loglevel, me, control_block.logfile);
+ control_block.loglevel = yaz_log_mask_str(arg);
+ yaz_log_init(control_block.loglevel, me, control_block.logfile);
break;
case 'a':
strcpy(control_block.apdufile, arg ? arg : "");
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: log.c,v $
- * Revision 1.23 2000-03-14 09:06:11 adam
+ * Revision 1.24 2000-09-04 08:58:15 adam
+ * Added prefix yaz_ for most logging utility functions.
+ *
+ * Revision 1.23 2000/03/14 09:06:11 adam
* Added POSIX threads support for frontend server.
*
* Revision 1.22 2000/02/29 13:44:55 adam
{ 0, NULL }
};
-FILE *log_file(void)
+FILE *yaz_log_file(void)
{
if (!l_file)
l_file = stderr;
return l_file;
}
-void log_init_file (const char *fname)
+void yaz_log_init_file (const char *fname)
{
FILE *new_file;
if (!l_file)
l_file = new_file;
}
-void log_init_level (int level)
+void yaz_log_init_level (int level)
{
l_level = level;
}
-void log_init_prefix (const char *prefix)
+void yaz_log_init_prefix (const char *prefix)
{
if (prefix && *prefix)
sprintf(l_prefix, "%.512s", prefix);
}
-void log_init(int level, const char *prefix, const char *fname)
+void yaz_log_init(int level, const char *prefix, const char *fname)
{
- log_init_level (level);
- log_init_prefix (prefix);
- log_init_file (fname);
+ yaz_log_init_level (level);
+ yaz_log_init_prefix (prefix);
+ yaz_log_init_file (fname);
}
static void (*start_hook_func)(int, const char *, void *) = NULL;
(*end_hook_func)(o_level, buf, end_hook_info);
}
-int log_mask_str (const char *str)
+int yaz_log_mask_str (const char *str)
{
- return log_mask_str_x (str, LOG_DEFAULT_LEVEL);
+ return yaz_log_mask_str_x (str, LOG_DEFAULT_LEVEL);
}
-int log_mask_str_x (const char *str, int level)
+int yaz_log_mask_str_x (const char *str, int level)
{
const char *p;
int i;
* Chas Woodfield, Fretwell Downing Datasystems.
*
* $Log: ztest.c,v $
- * Revision 1.33 2000-08-10 08:41:26 adam
+ * Revision 1.34 2000-09-04 08:58:15 adam
+ * Added prefix yaz_ for most logging utility functions.
+ *
+ * Revision 1.33 2000/08/10 08:41:26 adam
* Fixes for ILL.
*
* Revision 1.32 2000/04/05 07:39:55 adam
odr_offset(rr->decode));
#if 0
yaz_log(LOG_LOG, "PDU dump:");
- odr_dumpBER(log_file(),
+ odr_dumpBER(yaz_log_file(),
r->u.single_ASN1_type->buf,
r->u.single_ASN1_type->len);
#endif
odr_errmsg(odr_geterror(rr->decode)),
odr_offset(rr->decode));
yaz_log(LOG_LOG, "PDU dump:");
- odr_dumpBER(log_file(),
+ odr_dumpBER(yaz_log_file(),
r->u.single_ASN1_type->buf,
r->u.single_ASN1_type->len);
}