GitHub PushEvent at 2014-03-28 11:54:19
Repository: glusterfs
Actor: avati
Payload: {"shas":[["31e34cfd72712c76c127509d14d50eb008743fd5","a66bd9d22fa4c9ed39b8c456e41d73cd52b5e2f8@redhat.com","log: enhance gluster log format with message ID and standardize errno reporting\n\n\tCurrently there are quite a slew of logs in Gluster that do not\n\tlend themselves to trivial analysis by various tools that help\n\tcollect\tand monitor logs, due to the textual nature of the logs.\n\n\tThis FEAT is to make this better by giving logs message IDs so\n\tthat the tools do not have to do complex log parsing to break\n\tit down to problem areas and suggest troubleshooting options.\n\n\tWith this patch, a new set of logging APIs are introduced that\n\ttake additionally a message ID and an error number, so as to\n\tprint the message ID and the descriptive string for the error.\n\n\tNew APIs:\n\t\t- gf_msg, gf_msg_debug/trace, gf_msg_nomem, gf_msg_callingfn\n\n\tThese APIs follow the functionality of the previous gf_log*\n\tcounterparts, and hence are 1:1 replacements, with the delta\n\tthat, gf_msg, gf_msg_callingfn take additional parameters as\n\tspecified above.\n\n\tDefining the log messages:\n\tEach invocation of gf_msg/gf_msg_callingfn, should provide an ID\n\tand an errnum (if available). Towards this, a common message id\n\tfile is provided, which contains defines to various messages and\n\ttheir respective strings. As other messages are changed to the\n\tnew infrastructure APIs, it is intended that this file is edited\n\tto add these messages as well.\n\n\tFramework enhanced:\n\tThe logging framework is also enhanced to be able to support\n\tdifferent logging backends in the future. Hence new configuration\n\toptions for logging framework and logging formats are introduced.\n\n\tBackward compatibility:\n\tCurrently the framework supports logging in the traditional\n\tformat, with the inclusion of an error string based on the errnum\n\tpassed in. Hence the shift to these new APIs would retain the log\n\tfile names, locations, and format with the exception of an\n\tadditional error string where applicable.\n\n\tTesting done:\n\tTested the new APIs with different messages in normal code paths\n\tTested with configurations set to gluster logs (syslog pending)\n\tTested nomem variants, inducing the message in normal code paths\n\tTested ident generation for normal code paths (other paths\n\t\tpending)\n\tTested with sample gfapi program for gfapi messages\n\tTest code is stripped from the commit\n\n\tPending work (not to be addressed in this patch (future)):\n\t- Logging framework should be configurable\n\t- Logging format should be configurable\n\t- Once all messages move to the new APIs deprecate/delete older\n\t  APIs to prevent misuse/abuse using the same\n\t- Repeated log messages should be suppressed (as a configurable\n\t  option)\n\t- Logging framework assumes that only one init is possible, but\n\t  there is no protection around the same (in existing code)\n\t- gf_log_fini is not invoked anywhere and does very little\n\t  cleanup (in existing code)\n\t- DOxygen comments to message id headers for each message\n\nChange-Id: Ia043fda99a1c6cf7817517ef9e279bfcf35dcc24\nBUG: 1075611\nSigned-off-by: ShyamsundarR <srangana@redhat.com>\nReviewed-on: http://review.gluster.org/6547\nReviewed-by: Krutika Dhananjay <kdhananj@redhat.com>\nTested-by: Gluster Build System <jenkins@build.gluster.com>\nReviewed-by: Raghavendra G <rgowdapp@redhat.com>\nReviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>\nReviewed-by: Vijay Bellur <vbellur@redhat.com>","ShyamsundarR",true]],"size":1,"ref":"refs/heads/master","head":"31e34cfd72712c76c127509d14d50eb008743fd5"}