[CXX-43] Remove LOG macro Created: 06/Feb/14  Updated: 23/Oct/14  Resolved: 12/Sep/14

Status: Closed
Project: C++ Driver
Component/s: API
Affects Version/s: None
Fix Version/s: legacy-1.0.0-rc1

Type: Improvement Priority: Major - P3
Reporter: Matt Kangas Assignee: Tyler Brock
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-7233 LOG macro can leak into client code. Closed
Related
is related to CXX-208 Audit Client API for possible depreca... Closed

 Description   

From https://github.com/mongodb/mongo/pull/166 (Created January 2012)

The macro "LOG" should be removed because the name "LOG" is too common and conflicts with some other products.

For example, current mongodb is not work with google-glog. It also uses "LOG" macro for logging.

Here is a sample code:

#include <glog/logging.h>
#include <client/dbclient.h> // <- undefs LOG macro
 
int main() {
  LOG(ERROR) << "hoge"; // compile error
}



 Comments   
Comment by Githook User [ 12/Sep/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: CXX-208 Remove some non-user facing headers from published list

Also, as a side effect, fixes CXX-43
Branch: legacy
https://github.com/mongodb/mongo-cxx-driver/commit/ebfd4c158aa01a11480ed69fa94981c8164fd30a

Comment by Tyler Brock [ 12/Sep/14 ]

We actually picked up changes that make this go away via backport. The installed includes do not have any uses of the LOG macro.

Generated at Wed Feb 07 21:58:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.