logd
2016-05-20 15:14:11 0 举报
logd是一个日志记录工具,它可以帮助用户在开发过程中快速定位问题和调试代码。通过logd,用户可以将程序运行过程中的关键信息、错误信息、警告信息等记录下来,以便于后期分析和处理。此外,logd还支持多种输出格式,如控制台输出、文件输出等,方便用户根据需要进行选择。总之,logd是一个非常实用的工具,对于开发者来说,掌握它的使用方法将会大大提高编程效率。
作者其他创作
大纲/内容
LogListener
-logbuf:LogBuffer*-reader:LogReader*
-getLogSocket():int#onDataAvailable(SocketClient *cli):bool
FrameworkCommand
+ runCommand:int+getCommand:char *
CommandListener
LogBuffer
-mLogElements:LogBufferElementCollection- mLogElementsLock:pthread_mutex_t- stats:LogStatistics-mPrune:PruneList-mLast:LogBufferElementCollection::iterator[]-mLastSet:bool[]-mLastWorstUid:LogBufferIteratorMap[]-mLastWorstPidOfSystem:LogBufferPidIteratorMap[]-mMaxSize:long[]-monotonic:bool-mTimes:LastLogTimes &-minPrune:static constexpr size_t= 4-maxPrune:static constexpr size_t= 256
观察者
通知者(subject)
ShutdownCmd
FlushCommand
- mReader:LogReader &-mNonBlock:bool-mTail:long-mLogMask:int-mPid:pid_t-mStart:uint64_t-mTimeout:uint64_t
+ runSocketCommand(SocketClient *client)+ hasReadLogs(SocketClient *client):bool+hasSecurityLogs(SocketClient *client):bool
SocketClientCommand
+runSocketCommand(SocketClient*)
LogCommand
SocketClient
- mSocket:int - mSocketOwned:bool- mWriteMutex:pthread_mutex_t-mPid:pid_t-mUid:uid_t-mGid:gid_t-mRefCountMutex:pthread_mutex_t-mRefCount:int-mCmdNum:int-mUseCmdNum:bool
SocketListener
FrameworkListener
+CMD_ARGS_MAX:int=26+errorRate:int-mCommandCount:int-mWithSeq:bool-mCommands:FrameworkCommandCollection*
LogReader
+ attribute1:type = defaultValue+ attribute2:type- attribute3:type
+ logbuf(void):LogBuffer&+notifyNewLog()-getLogSocket():int-doSocketDelete(SocketClient *cli)#onDataAvailable(SocketClient *cli):bool
LogBufferCmd
ReinitCmd
LogBufferElement
+FLUSH_ERROR:uint64_t- mLogId:log_id_t - mUid:uid_t- mPid:pid_t-mTid:pid_t-mMsgLen:union-mDropped:union-mSequence:uint64_t-mRealTime:log_time-sequence:atomic_int_fast64_t
0 条评论
下一页
为你推荐
查看更多