Commit 588b389c authored by Matteo Quintiliani's avatar Matteo Quintiliani

Minor revision


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@243 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 0e167ef9
......@@ -14,19 +14,19 @@
/*! normal output with time and package name */
#define LOG_NORM 0
#define NMXP_LOG_NORM 0
/*! error output with time and package name */
#define LOG_ERR 1
#define NMXP_LOG_ERR 1
/*! warning output with time and package name */
#define LOG_WARN 2
#define NMXP_LOG_WARN 2
/*! normal output without time and package name */
#define LOG_NORM_NO 3
#define NMXP_LOG_NORM_NO 3
/*! normal output with only package name */
#define LOG_NORM_PKG 4
#define NMXP_LOG_NORM_PKG 4
/*! \brief A generic logging/printing routine
......
......@@ -276,7 +276,7 @@ int nmxp_data_log(NMXP_DATA_PROCESS *pd) {
// nmxp_log(0, 0, "%12d %5s.%3s rate=%03d (%s - %s) [%d, %d] pts=%04d (%d, %d, %d, %d) lat=%.1f len=%d\n",
// printf("%10d %5s.%3s 03dHz (%s - %s) lat=%.1fs [%d, %d] pts=%04d (%d, %d, %d, %d) len=%d\n",
nmxp_log(LOG_NORM_NO, 0, "%s.%s.%3s %3dHz (%s - %s) lat %.1fs [%d, %d] (%d) %4dpts (%d, %d, %d, %d, %d) %d\n",
nmxp_log(NMXP_LOG_NORM_NO, 0, "%s.%s.%3s %3dHz (%s - %s) lat %.1fs [%d, %d] (%d) %4dpts (%d, %d, %d, %d, %d) %d\n",
/* pd->key, */
pd->network,
(strlen(pd->station) == 0)? "XXXX" : pd->station,
......
......@@ -51,16 +51,16 @@ int nmxp_log(int level, int verb, ... )
retvalue = vsnprintf(message, MAX_LOG_MESSAGE_LENGTH, format, listptr);
switch(level) {
case LOG_ERR:
case NMXP_LOG_ERR:
printf("%s - %s: error: %s", timestr, PACKAGE_NAME, message);
break;
case LOG_WARN:
case NMXP_LOG_WARN:
printf("%s - %s: warning: %s", timestr, PACKAGE_NAME, message);
break;
case LOG_NORM_NO:
case NMXP_LOG_NORM_NO:
printf("%s", message);
break;
case LOG_NORM_PKG:
case NMXP_LOG_NORM_PKG:
printf("%s: %s", PACKAGE_NAME, message);
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment