launch_daemon: Added basic logging facility

* The daemon now stores many events in am internal log.
* You can use "launch_roster log" to retrieve it.
This commit is contained in:
Axel Dörfler
2018-04-25 10:10:43 +02:00
parent 6d7b8a3088
commit a77aa747ea
13 changed files with 1227 additions and 33 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017, Haiku, Inc. All Rights Reserved.
* Copyright 2015-2018, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -45,6 +45,7 @@ enum {
B_GET_LAUNCH_JOBS = 'lngj',
B_GET_LAUNCH_TARGET_INFO = 'lntI',
B_GET_LAUNCH_JOB_INFO = 'lnjI',
B_GET_LAUNCH_LOG = 'lnLL',
};
+5 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 Haiku, Inc. All rights reserved.
* Copyright 2015-2018 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _LAUNCH_ROSTER_H
@@ -56,6 +56,9 @@ public:
status_t GetJobs(const char* target, BStringList& jobs);
status_t GetJobInfo(const char* name, BMessage& info);
status_t GetLog(BMessage& info);
status_t GetLog(const BMessage& filter, BMessage& info);
class Private;
private:
@@ -70,6 +73,7 @@ private:
uint32 flags = 0);
status_t _GetInfo(uint32 what, const char* name,
BMessage& info);
status_t _GetLog(const BMessage* filter, BMessage& info);
private:
BMessenger fMessenger;