All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] logging refactoring
@ 2009-12-08  0:42 Colin McCabe
  2009-12-08  0:42 ` [PATCH 1/6] cld: Declare common.c functions in common.h Colin McCabe
  0 siblings, 1 reply; 11+ messages in thread
From: Colin McCabe @ 2009-12-08  0:42 UTC (permalink / raw)
  To: Project Hail List; +Cc: Pete Zaitcev, Jeff Garzik

This patch series creates a common.h and populates it with some function
prototypes and logging stuff.

The changes here are fairly minor and mostly consist of switching over to use
the new logging macros. Probably the most helpful one is CLD_DEBUG, which only
evaluates its arguments if log->verbose is set. CLD_INFO, CLD_WARN, CLD_ERR
and CLD_CRIT simply call the log function with the appropriate log level, in a
shorter amount of code.

I also eliminated some cases where we had to pass both a logging function and
a verbosity level. We only need to pass a pointer to a cld_log struct now.
This should facilitate some code sharing and hopefully improve stuff.

regards,
C.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/6 v2] logging refactoring
@ 2009-12-09  0:11 Colin McCabe
  2009-12-09  0:11 ` [PATCH 4/6] cld: modify server code to use logging macros Colin McCabe
  0 siblings, 1 reply; 11+ messages in thread
From: Colin McCabe @ 2009-12-09  0:11 UTC (permalink / raw)
  To: Project Hail List; +Cc: Pete Zaitcev, Jeff Garzik, Colin McCabe

This patch series creates a common.h and populates it with some function
prototypes and logging stuff.

version 2:
* Rename CLD_DEBUG, etc. to HAIL_DEBUG
* use angle brackets for including common.h from include/

Colin McCabe (6):
  cld: Declare common.c functions in common.h
  cld: create logging macros
  cld: modify client code to use logging macros
  cld: modify server code to use logging macros
  cld: modify cld-dns to use logging macros
  cld: Tweak some log levels in cldc dns

 include/cld_msg.h |   10 -----
 include/cldc.h    |   12 +++----
 include/common.h  |   38 ++++++++++++++++++++
 lib/cldc-dns.c    |   82 +++++++++++++++++---------------------------
 lib/cldc.c        |   98 +++++++++++++++++++++-------------------------------
 server/cld.h      |    4 +-
 server/cldb.c     |    6 ++--
 server/msg.c      |   49 +++++++++++---------------
 server/server.c   |   86 ++++++++++++++++++++--------------------------
 server/session.c  |   57 ++++++++++++-------------------
 server/util.c     |   27 +++++++-------
 tools/cldcli.c    |   14 +++++---
 12 files changed, 223 insertions(+), 260 deletions(-)
 create mode 100644 include/common.h

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-12-09  0:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08  0:42 [PATCH 0/6] logging refactoring Colin McCabe
2009-12-08  0:42 ` [PATCH 1/6] cld: Declare common.c functions in common.h Colin McCabe
2009-12-08  0:43   ` [PATCH 2/6] cld: create logging macros Colin McCabe
2009-12-08  0:43     ` [PATCH 3/6] cld: modify client code to use " Colin McCabe
2009-12-08  0:43       ` [PATCH 4/6] cld: modify server " Colin McCabe
2009-12-08  0:43         ` [PATCH 5/6] cld: modify cld-dns " Colin McCabe
2009-12-08  0:43           ` [PATCH 6/6] cld: Tweak some log levels in cldc dns Colin McCabe
2009-12-08 18:13         ` [PATCH 4/6] cld: modify server code to use logging macros Pete Zaitcev
2009-12-08 19:08           ` Colin McCabe
2009-12-08 21:28           ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2009-12-09  0:11 [PATCH 0/6 v2] logging refactoring Colin McCabe
2009-12-09  0:11 ` [PATCH 4/6] cld: modify server code to use logging macros Colin McCabe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.