diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-12 17:52:41 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-12 17:52:41 -0500 |
commit | 4b1c6ecccb0a1dc155f6fe8c40d3c353b79c09a4 (patch) | |
tree | fb2f432b1892ef40c14b562708982e57ab937ffe /driver_proto.c | |
parent | 25c55a4c7a4ed769ac10073fb65466f31305d305 (diff) | |
download | gpsd-4b1c6ecccb0a1dc155f6fe8c40d3c353b79c09a4.tar.gz |
Reduce gpsd log verbosity a lot.
Way too much logging was happening at LOG_IO level, which is intended for
watching data traffic in and out of the daemon rather than all the minutiae
of data analysis - that's LOG_DATA.
Also, LOG_DATA gets pushed down two levels. The effect is that -D 5
means exactly what it did, but for purposes other than driver debugging
-D 4 now suffices.
Diffstat (limited to 'driver_proto.c')
-rw-r--r-- | driver_proto.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/driver_proto.c b/driver_proto.c index 319418fa..b85e3818 100644 --- a/driver_proto.c +++ b/driver_proto.c @@ -72,7 +72,8 @@ _proto__msg_navsol(struct gps_device_t *session, unsigned char *buf, size_t data if (data_len != _PROTO__NAVSOL_MSG_LEN) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ NAVSOL - navigation data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ NAVSOL - navigation data\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__SOLUTION_VALID) == 0) @@ -120,7 +121,8 @@ _proto__msg_navsol(struct gps_device_t *session, unsigned char *buf, size_t data * the fields it potentially set and the transfer mask. Doing this * makes it relatively easy to track down data-management problems. */ - gpsd_report(session->context->debug, LOG_DATA, "NAVSOL: time=%.2f, lat=%.2f lon=%.2f alt=%.2f mode=%d status=%d\n", + gpsd_report(session->context->debug, LOG_DATA, + "NAVSOL: time=%.2f, lat=%.2f lon=%.2f alt=%.2f mode=%d status=%d\n", session->newdata.time, session->newdata.latitude, session->newdata.longitude, @@ -142,7 +144,8 @@ _proto__msg_utctime(struct gps_device_t *session, unsigned char *buf, size_t dat if (data_len != UTCTIME_MSG_LEN) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ UTCTIME - navigation data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ UTCTIME - navigation data\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__TIME_VALID) == 0) @@ -168,7 +171,8 @@ _proto__msg_svinfo(struct gps_device_t *session, unsigned char *buf, size_t data if (data_len != SVINFO_MSG_LEN ) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ SVINFO - navigation data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ SVINFO - navigation data\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__SVINFO_VALID) == 0) @@ -183,7 +187,8 @@ _proto__msg_svinfo(struct gps_device_t *session, unsigned char *buf, size_t data */ nchan = GET_NUMBER_OF_CHANNELS(); if ((nchan < 1) || (nchan > MAXCHANNELS)) { - gpsd_report(session->context->debug, LOG_INF, "too many channels reported\n"); + gpsd_report(session->context->debug, LOG_INF, + "too many channels reported\n"); return 0; } gpsd_zero_satellites(&session->gpsdata); @@ -226,7 +231,8 @@ _proto__msg_raw(struct gps_device_t *session, unsigned char *buf, size_t data_le if (data_len != RAW_MSG_LEN ) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ RAW - raw measurements\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ RAW - raw measurements\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__SVINFO_VALID) == 0) @@ -241,7 +247,8 @@ _proto__msg_raw(struct gps_device_t *session, unsigned char *buf, size_t data_le */ nchan = GET_NUMBER_OF_CHANNELS(); if ((nchan < 1) || (nchan > MAXCHANNELS)) { - gpsd_report(session->context->debug, LOG_INF, "too many channels reported\n"); + gpsd_report(session->context->debug, LOG_INF, + "too many channels reported\n"); return 0; } @@ -285,7 +292,8 @@ gps_mask_t _proto__dispatch(struct gps_device_t *session, unsigned char *buf, si type = GET_MESSAGE_TYPE(); /* we may need to dump the raw packet */ - gpsd_report(session->context->debug, LOG_RAW, "raw _proto_ packet type 0x%02x\n", type); + gpsd_report(session->context->debug, LOG_RAW, + "raw _proto_ packet type 0x%02x\n", type); /* * The tag field is only 8 bytes; be careful you do not overflow. @@ -299,7 +307,8 @@ gps_mask_t _proto__dispatch(struct gps_device_t *session, unsigned char *buf, si /* Deliver message to specific decoder based on message type */ default: - gpsd_report(session->context->debug, LOG_WARN, "unknown packet id %d length %d\n", type, len); + gpsd_report(session->context->debug, LOG_WARN, + "unknown packet id %d length %d\n", type, len); return 0; } } @@ -349,7 +358,8 @@ static ssize_t _proto__control_send(struct gps_device_t *session, /* we may need to dump the message */ return gpsd_write(session, session->msgbuf, session->msgbuflen); - gpsd_report(session->context->debug, LOG_IO, "writing _proto_ control type %02x\n"); + gpsd_report(session->context->debug, LOG_DATA, + "writing _proto_ control type %02x\n"); return gpsd_write(session, session->msgbuf, session->msgbuflen); } /*@ -charint +usedef +compdef @*/ |