Changeset 2583
- Timestamp:
- 11/19/2011 06:22:41 PM (18 months ago)
- Files:
-
- 4 added
- 5 modified
-
CommonLibs/trunk/Logger.cpp (modified) (2 diffs)
-
CommonLibs/trunk/Logger.h (modified) (2 diffs)
-
openbts/trunk/CommonLibs/Logger.cpp (modified) (2 diffs)
-
openbts/trunk/CommonLibs/Logger.h (modified) (2 diffs)
-
subscriberRegistry/features/a3a8 (added)
-
subscriberRegistry/features/a3a8/Makefile (added)
-
subscriberRegistry/features/a3a8/SubscriberRegistry.cpp (added)
-
subscriberRegistry/features/a3a8/SubscriberRegistry.h (added)
-
subscriberRegistry/trunk/SubscriberRegistry.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CommonLibs/trunk/Logger.cpp
r2254 r2583 151 151 Log::~Log() 152 152 { 153 if (mDummyInit) return; 153 154 // Anything at or above LOG_CRIT is an "alarm". 154 155 // Save alarms in the local list and echo them to stderr. … … 160 161 // So just log. 161 162 syslog(mPriority, "%s", mStream.str().c_str()); 163 } 164 165 166 Log::Log(const char* name, const char* level, int facility) 167 { 168 mDummyInit = true; 169 gLogInit(name, level, facility); 162 170 } 163 171 -
CommonLibs/trunk/Logger.h
r2254 r2583 41 41 Log(LOG_##level).get() << pthread_self() \ 42 42 << " " __FILE__ ":" << __LINE__ << ":" << __FUNCTION__ << ": " 43 44 #ifdef NDEBUG 45 #define LOG(wLevel) \ 46 if (LOG_##wLevel!=LOG_DEBUG && gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 47 #else 43 48 #define LOG(wLevel) \ 44 49 if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 50 #endif 51 52 45 53 #define OBJLOG(wLevel) \ 46 if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) << "obj: " << this << ' '54 LOG(wLevel) << "obj: " << this << ' ' 47 55 48 56 #define LOG_ASSERT(x) { if (!(x)) LOG(EMERG) << "assertion " #x " failed"; } assert(x); … … 67 75 std::ostringstream mStream; ///< This is where we buffer up the log entry. 68 76 int mPriority; ///< Priority of current repot. 77 bool mDummyInit; 69 78 70 79 public: 71 80 72 81 Log(int wPriority) 73 :mPriority(wPriority) 82 :mPriority(wPriority), mDummyInit(false) 74 83 { } 84 85 Log(const char* name, const char* level=NULL, int facility=LOG_USER); 75 86 76 87 // Most of the work is in the desctructor. -
openbts/trunk/CommonLibs/Logger.cpp
r2242 r2583 151 151 Log::~Log() 152 152 { 153 if (mDummyInit) return; 153 154 // Anything at or above LOG_CRIT is an "alarm". 154 155 // Save alarms in the local list and echo them to stderr. … … 160 161 // So just log. 161 162 syslog(mPriority, "%s", mStream.str().c_str()); 163 } 164 165 166 Log::Log(const char* name, const char* level, int facility) 167 { 168 mDummyInit = true; 169 gLogInit(name, level, facility); 162 170 } 163 171 -
openbts/trunk/CommonLibs/Logger.h
r2242 r2583 41 41 Log(LOG_##level).get() << pthread_self() \ 42 42 << " " __FILE__ ":" << __LINE__ << ":" << __FUNCTION__ << ": " 43 44 #ifdef NDEBUG 45 #define LOG(wLevel) \ 46 if (LOG_##wLevel!=LOG_DEBUG && gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 47 #else 43 48 #define LOG(wLevel) \ 44 49 if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 50 #endif 51 52 45 53 #define OBJLOG(wLevel) \ 46 if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) << "obj: " << this << ' '54 LOG(wLevel) << "obj: " << this << ' ' 47 55 48 56 #define LOG_ASSERT(x) { if (!(x)) LOG(EMERG) << "assertion " #x " failed"; } assert(x); … … 67 75 std::ostringstream mStream; ///< This is where we buffer up the log entry. 68 76 int mPriority; ///< Priority of current repot. 77 bool mDummyInit; 69 78 70 79 public: 71 80 72 81 Log(int wPriority) 73 :mPriority(wPriority) 82 :mPriority(wPriority), mDummyInit(false) 74 83 { } 84 85 Log(const char* name, const char* level=NULL, int facility=LOG_USER); 75 86 76 87 // Most of the work is in the desctructor. -
subscriberRegistry/trunk/SubscriberRegistry.cpp
r2243 r2583 145 145 "ki varchar(33) default '', " 146 146 "kc varchar(33) default '', " 147 "prepaid int(1) DEFAULT 0 not null, "148 "secondsRemaining int(11) DEFAULT 0 not null, "149 147 "RRLPSupported int(1) default 1 not null, " 150 148 "regTime INTEGER default 0 NOT NULL, " // Unix time of most recent registration
![(please configure the [header_logo] section in trac.ini)](http://wush.net/trac/rangepublic/raw-attachment/wiki/WikiStart/PublicReleaseLogo.png)
