Hi Mark, Thanks for your quick response. I will loop my colleague and my work email in this thread to continue discuss.
After debug we found that the LogListener designed to use datagram socket type. Code and init.rc as following: system/core/logd/LogListener.cpp int LogListener::getLogSocket() { static const char socketName[] = "logdw"; int sock = android_get_control_socket(socketName); if (sock < 0) { sock = socket_local_server(socketName, ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_DGRAM); } int on = 1; if (setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) { return -1; } return sock; } system/core/rootdir/init.rc service logd /system/bin/logd class core socket logd stream 0666 logd logd socket logdr seqpacket 0666 logd logd socket logdw dgram 0222 logd logd group root system The datagram socket can't guarantee the data can be delivered successful. In our environment, the logs are too much which cause LogListener can't received successful. To my understanding, you designed to use datagram is for reducing the CPU bandwidth wasted by logd. But for debug usage, log lost may impact the developer. Do you have any suggestions to avoid this behavior? For example, can support some specific arguments to capture the full logs? Thanks Yu 2015-10-26 23:56 GMT+08:00 Mark Salyzyn <saly...@google.com>: > There should be no dropping of new logs, we remove from the oldest side. > > Please check if you are getting any 'liblog' tag messages in the events > buffer. > > We now maintain some 'chatty' entries, which provide temporal details for > logs that are expired before others and allow for some correlation of > activities between resources. > > Sincerely -- Mark Salyzyn > > On Sun, Oct 25, 2015 at 9:56 PM, yu wang <fish.wang8...@gmail.com> wrote: > >> Loop logd author. >> >> Hi Mark, >> >> Can you please help comment? Is there any available arguments or method >> can avoid log miss? >> >> Thanks >> Yu >> >> ---------- Forwarded message ---------- >> From: big_fish_ <fish.wang8...@gmail.com> >> Date: 2015-10-20 19:25 GMT+08:00 >> Subject: [android-porting] Logcat log easy get lost >> To: android-porting <android-porting@googlegroups.com> >> >> >> Hi experts, >> >> We found that somehow the logcat log easy get lost. I am using the >> official M code base. >> Is there anyone can help provide some clues about it? Is it caused by >> some buffers were full, then logd dropped the new logs? >> Is there any solutions to avoid this behavior? It is hard to debug now. >> >> Thanks >> Yu >> >> -- >> -- >> unsubscribe: android-porting+unsubscr...@googlegroups.com >> website: http://groups.google.com/group/android-porting >> >> --- >> You received this message because you are subscribed to the Google Groups >> "android-porting" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to android-porting+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> >> > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.