diff options
author | Nick Kralevich | 2011-12-15 13:43:38 -0600 |
---|---|---|
committer | Mark Salyzyn | 2014-02-14 13:07:54 -0600 |
commit | 3e76e0a49760c4970b7cda6153e51026af98e4f3 (patch) | |
tree | 2ab3db2fe4c97e76657c24c2cf9097314395c5ef /logd/LogListener.h | |
parent | 1beb2ab6f6f7cec157b25a2e728c6de8c6be58c4 (diff) | |
download | platform-system-core-3e76e0a49760c4970b7cda6153e51026af98e4f3.tar.gz platform-system-core-3e76e0a49760c4970b7cda6153e51026af98e4f3.tar.xz platform-system-core-3e76e0a49760c4970b7cda6153e51026af98e4f3.zip |
logd: initial checkin.
* Create a new userspace log daemon for handling logging messages.
Original-Change-Id: I75267df16359684490121e6c31cca48614d79856
Signed-off-by: Nick Kralevich <nnk@google.com>
* Merge conflicts
* rename new syslog daemon to logd to prevent confusion with bionic syslog
* replace racy getGroups call with KISS call to client->getGid()
* Timestamps are filed at logging source
* insert entries into list in timestamp order
* Added LogTimeEntry tail filtration handling
* Added region locking around LogWriter list
* separate threads for each writer
* /dev/socket/logd* permissions
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098
Diffstat (limited to 'logd/LogListener.h')
-rw-r--r-- | logd/LogListener.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/logd/LogListener.h b/logd/LogListener.h new file mode 100644 index 000000000..7099e1325 --- /dev/null +++ b/logd/LogListener.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012-2013 The Android Open Source Project | ||
3 | * | ||
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | * you may not use this file except in compliance with the License. | ||
6 | * You may obtain a copy of the License at | ||
7 | * | ||
8 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | * | ||
10 | * Unless required by applicable law or agreed to in writing, software | ||
11 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | * See the License for the specific language governing permissions and | ||
14 | * limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #ifndef _LOGD_LOG_LISTENER_H__ | ||
18 | #define _LOGD_LOG_LISTENER_H__ | ||
19 | |||
20 | #include <sysutils/SocketListener.h> | ||
21 | #include "LogReader.h" | ||
22 | |||
23 | class LogListener : public SocketListener { | ||
24 | LogBuffer *logbuf; | ||
25 | LogReader *reader; | ||
26 | |||
27 | public: | ||
28 | LogListener(LogBuffer *buf, LogReader *reader); | ||
29 | |||
30 | protected: | ||
31 | virtual bool onDataAvailable(SocketClient *cli); | ||
32 | |||
33 | private: | ||
34 | static int getLogSocket(); | ||
35 | }; | ||
36 | |||
37 | #endif | ||