Michal Bloch [Mon, 26 Nov 2018 11:00:57 +0000 (12:00 +0100)]
Fix pipe resize failure being considered an error
Pipes are enlarged so that prolific logging does not clog the pipe,
which is just an optimisation - logging can still continue if it
fails (albeit slower).
Change-Id: I5218512d3b22eea1636460ed463eeb2280faa9e7
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 26 Nov 2018 12:57:45 +0000 (13:57 +0100)]
Build process: create a test coverage report
Uses LCOV to assemble a HTML report in the build directory.
Change-Id: I990d3d59b5fcb500708688c06e7f9a6573e39255
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 23 Nov 2018 13:15:24 +0000 (14:15 +0100)]
tests: add dlogctl buffer toggling tests
Change-Id: Ibbdfbc938799230cf3e036d7274bf9ffdc9b0e1e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 23 Nov 2018 17:18:10 +0000 (18:18 +0100)]
tests: test misc utility stuff from logcommon.h
Change-Id: Ib8ea673ae9eeae990dcfe8e998fc8383df3c8bae
Michal Bloch [Fri, 23 Nov 2018 11:41:22 +0000 (12:41 +0100)]
tests: add daemon file descriptor checks
Checks whether the daemon crashes with low FD limit
and whether it leaks any FDs.
Change-Id: I7352a0e71b5e066ad4600854f34d6bc67375df40
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 23 Nov 2018 11:41:35 +0000 (12:41 +0100)]
tests: cleanup programs when no longer needed
Change-Id: I5cbe9a0723d7cecc657198fb716e78256c5bbde9
Michal Bloch [Wed, 21 Nov 2018 13:37:54 +0000 (14:37 +0100)]
dlogctl: fix -s working as -c if without -t or -p
Change-Id: Icf3dfee19d51a7312c4f392424774904622dd24e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 16 Nov 2018 14:53:04 +0000 (15:53 +0100)]
dlogctl: add --clear / -c
Without any parameters, clears all rules. With just one of -t or -p
supplied, the other is assumed to be '*' (same logic as -g).
The argument to the -s option is now mandatory.
Change-Id: I3ec152e49076f58b1f052e4c21c32fcee0deff56
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 20 Nov 2018 10:58:24 +0000 (11:58 +0100)]
dlogctl: add a parameter correctness check
Now `-g -s 123 --disable` is disallowed.
Change-Id: I9b8163e21cbc9c4fe1d20d2d3c58d289cfb0f640
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 15 Nov 2018 15:47:25 +0000 (16:47 +0100)]
dlog_logger: commentary for the recent epoll fixes
Some of the recent epoll changes needed an explanation
since it wasn't immediately obvious how they work.
Change-Id: Idecadedcd8bf8a570f65c602d7dbf11e971360f3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 15 Nov 2018 15:47:25 +0000 (16:47 +0100)]
dlog_logger: fix writing to files
Change-Id: I172cb2dcd8bf8a570f65c602d7dbf11e971360f3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 14 Nov 2018 14:51:58 +0000 (15:51 +0100)]
libdlog: filters the `apps` buffer by default
Change-Id: Ie89cd6f5f660cc831aa55e95db7181720fca9191
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Hyotaek Shim [Thu, 15 Nov 2018 01:48:25 +0000 (01:48 +0000)]
Merge "libdlog: enable dynamic filters by default" into tizen
Hyotaek Shim [Thu, 15 Nov 2018 01:42:08 +0000 (01:42 +0000)]
Merge "dlog_logger: reuse clock readings" into tizen
Michal Bloch [Wed, 14 Nov 2018 15:09:59 +0000 (16:09 +0100)]
libdlog: fix a dynamic config crash
Change-Id: I83867775088438636cf483a14616b8ef49106a84
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 14 Nov 2018 14:34:07 +0000 (15:34 +0100)]
libdlog: enable dynamic filters by default
Change-Id: I8f9a6ec4ab2d99c3bf4c4e36c6790db744747889
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 14 Nov 2018 14:29:33 +0000 (15:29 +0100)]
dlog_logger: reuse clock readings
No need for every reader to read the same value on its own.
Change-Id: I91f0e81306061607cb848911bafaf69554b15229
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 29 Oct 2018 16:54:28 +0000 (17:54 +0100)]
dlog_logger: improve reader epoll registration
* now keeps readers registered with EPOLLHUP for
immediate removal when the other end gets closed
* no longer attempts to unregister already unregistered FDs
Change-Id: If5a28be45158896a174ab90259648602af594b92
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 31 Oct 2018 13:45:42 +0000 (14:45 +0100)]
Release 5.0.4
Contains various fixes:
* fix dynamic config not rejecting relative paths
* fix libdlog not closing FDs on exec() under Android Logger backend
* fix removal of the dynamic config file being unhandled
* fix treating log limitation as an error
Also:
* increase the daemon's FD limit from 1K to 16K
* optimize dlogutil's dumping mode performance
Change-Id: Ic3ac0ab254490268698af46da73723e963edd57a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 26 Oct 2018 10:31:25 +0000 (12:31 +0200)]
dlog_logger daemon: reaching FD limit leaves a log
Change-Id: Ie70e7fa6e1fe5a3c394e0fd428cf0aa3375e03aa
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Mon, 29 Oct 2018 11:30:37 +0000 (11:30 +0000)]
Merge "limiter: do not treat limiter restrictions as an error" into tizen
Maciej Slodczyk [Mon, 29 Oct 2018 10:51:35 +0000 (10:51 +0000)]
Merge "Handle deleting dynamic configuration file" into tizen
Maciej Slodczyk [Wed, 24 Oct 2018 15:54:04 +0000 (17:54 +0200)]
limiter: do not treat limiter restrictions as an error
Currently when a log is blocked by limiter rules,
dlog_print() returns an error code. Let it be blocked,
but return a success code - number of written bytes
(which is 0).
Change-Id: Ie37e3d0e17f0fa3cd9fef012412270bdce8565e2
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Hyotaek Shim [Fri, 26 Oct 2018 08:07:19 +0000 (17:07 +0900)]
Increase the limit of open files from 1K to 16K in dlog_logger
Change-Id: Ib334e7762099fef2008adec29da9120115764b19
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Maciej Slodczyk [Tue, 23 Oct 2018 14:33:55 +0000 (16:33 +0200)]
Handle deleting dynamic configuration file
It's no longer an error when a dynamic configuration
file is deleted - restore default values both for plog and
filters in that case.
Change-Id: I3ec06aeba50f2e74bfee90736beeb5634d79e06d
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Mon, 22 Oct 2018 14:37:06 +0000 (14:37 +0000)]
Merge "dynamic config: fail on relative paths" into tizen
Michal Bloch [Mon, 22 Oct 2018 12:16:18 +0000 (14:16 +0200)]
libdlog: close Android Logger connections on exec
Change-Id: Ib6576073f3c0c7f224a9d0c9605f879a9f347cd0
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 22 Oct 2018 10:25:11 +0000 (12:25 +0200)]
dynamic config: fail on relative paths
Change-Id: I50ca411b3268fdc25d1cb58a19f1dc8aa9752bbb
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 17 Oct 2018 12:08:39 +0000 (14:08 +0200)]
util: optimize dumping instance timezone handling
We can assume that such instances will not see a timezone
change happen during their lifetime, and even if they do,
it is probably best if they ignore it (a dump would ideally
behave as if it was atomic). This means we can optimize the
behaviour where printing the timestamp requires us to check
whether the timezone changed, which involves calling stat()
on /etc/localtime, which is not cheap on its own and made
even worse when multiple symlinks are involves.
glibc has a feature where setting the TZ environmental var
will cache the timezone, achieving precisely what we want.
Change-Id: I2f5e26a4be81b8f846036282fc1a0bfe02b70b48
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 19 Oct 2018 19:11:10 +0000 (21:11 +0200)]
Release 5.0.3
Contains fixes and documentation for the recently added
dynamic configuration features:
* the dlog-doc package now contains a usage guide describing
the new feature with examples and common mistakes
* fixed disabling dynamic configuration turning the limiter off as well
* fixed disabling all buffers being permanent
* fixed logs being able to slip through a disabled buffer
* fixed dynamic config behaviour with forked processes
And some miscellaneous fixes:
* fixed some resource leak and corruption issues
* fixed some spurious static analysis warnings
* fixed the config being needlessly read twice by libdlog
* fixed the daemon not noticing timezone changes for the purpose
of writing log files (on both backends)
Change-Id: I7acdc373c7acb5ae0b06bc0fe12ad507fd327d30
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 19 Oct 2018 19:07:44 +0000 (21:07 +0200)]
libdlog: Do not remove the dynamic filter watch in library destructor
Calling inotify_rm_watch() on inotify fd will remove watches for
all processes that share that inotify fd. This means that every
process that uses dlog and forks will have the dynamic config
feature broken.
This commit fixes that by removing the erroneous rm_watch.
Change-Id: If023d75937b5b435e2188aca7f70b57ce964c767
Michal Bloch [Fri, 19 Oct 2018 18:56:15 +0000 (20:56 +0200)]
documentation: describe some common mistakes
Change-Id: Ib18b454042a50152bc0815fe42780d2fb8a05004
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 16 Oct 2018 12:49:05 +0000 (14:49 +0200)]
Further documentation improvements
* fix some mistakes in the previous documentation commit
* in particular, make the txt file actually end up in the doc rpm
* extend config entry documentation
* remove unused entries
Change-Id: I6f423ee42f5fc26059ee738909208719e4dd6753
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 15 Oct 2018 13:40:26 +0000 (15:40 +0200)]
dlog_logger: update timezone at runtime
glibc looks for the existence of the TZ variable and caches the timezone,
preventing extra stat() calls. This saves some performance but also sets
the timezone in stone.
The daemon can afford the performance hit as it is spread gradually over
time.
Change-Id: I15e789a391e7a443c284b4e08d20dd7163eccce5
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 12 Oct 2018 14:23:39 +0000 (16:23 +0200)]
libdlog: fix broken limiter with static config
Change-Id: I0ecd8c3327ac12133aa2beb402bc1c52d598926b
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 12 Oct 2018 14:15:46 +0000 (16:15 +0200)]
libdlog: fix buffer disabling issues
- fix reenabling a buffer requiring a log to be
sent to another already enabled buffer
- fix one log being able to slip through into a
disabled buffer if was enabled the previous time
Change-Id: I47af64b8a74da31c24472190f2ab22806d16db26
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 2 Oct 2018 11:29:38 +0000 (13:29 +0200)]
libdlog: don't read the config twice
Change-Id: I6c921f264cec7da77da0918ee94f03493f017424
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 5 Oct 2018 17:17:12 +0000 (19:17 +0200)]
Fix various static analysis warnings.
Change-Id: I2e677130ee43e11abd870bd9647f15bdebde7667
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 9 Oct 2018 14:22:29 +0000 (16:22 +0200)]
dlogctl: documentation
* the priority parameter is now `--priority`;
note that `--prio`, as a contraction, is still accepted.
* the dynamic config entry is now mentioned in `--help`,
as is `limiter_apply_to_all_buffers`.
* add a guide/manual on dlogctl to the documentation folder.
Contains examples and commentary.
Change-Id: I80ce5f687f68d61efd729dffcfe70941c66ba3ab
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
pr.jung [Thu, 4 Oct 2018 05:02:17 +0000 (14:02 +0900)]
Add MIT License file
Change-Id: I7baea949dc8ffd3a83aca16bddb017fbb91e7f41
Signed-off-by: pr.jung <pr.jung@samsung.com>
Maciej Slodczyk [Tue, 2 Oct 2018 09:22:57 +0000 (09:22 +0000)]
Merge "dlogctl: add runtime platform logging control" into tizen
Maciej Slodczyk [Tue, 2 Oct 2018 09:22:55 +0000 (09:22 +0000)]
Merge "Extend the platform logging config values" into tizen
Michal Bloch [Wed, 19 Sep 2018 14:37:36 +0000 (16:37 +0200)]
dlogctl: add runtime platform logging control
The runtime buffer toggling feature can now be exercised using dlogctl.
Example usage:
$ dlogctl --enable
$ dlogctl --disable -b main -b system
Change-Id: I1fd6a87b7c1ff74fcdc2c0d4d2985941a3eb7f2d
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
pr.jung [Mon, 1 Oct 2018 05:32:50 +0000 (14:32 +0900)]
Remove svace error
Change-Id: I6b1b82251e219a980743e7c9cc5e780bb7902dfd
Signed-off-by: pr.jung <pr.jung@samsung.com>
Michal Bloch [Fri, 28 Sep 2018 14:22:31 +0000 (14:22 +0000)]
Merge "libdlog: separate limiter and dynamic config" into tizen
Michal Bloch [Fri, 28 Sep 2018 14:20:46 +0000 (14:20 +0000)]
Merge "Rename dynamic filters to dynamic config" into tizen
Michal Bloch [Fri, 7 Sep 2018 13:50:32 +0000 (15:50 +0200)]
Extend the platform logging config values
`plog` is a config value which controls whether platform logging is enabled,
i.e. whether logs are even sent to the respective buffers. This is a global
setting that affects all libdlog users indiscriminately but is very fast,
unlike filters which have fine-grained control over who gets to log and how
much but involve some processing.
* `enable_X` can now be set to control this per buffer, for example to only
control the `main` buffer, use `enable_main`. This overrides the global
default from the `plog` value.
* this can be set dynamically in the runtime config file, similar to filters.
* the generic `plog` config value still works as a default for the three
original buffers (`main`, `system`, `radio`) but can be overridden by
the per-buffer settings. The `apps` buffer does not obey this setting
and can only be controlled per-buffer. This is for backward compatibility.
Change-Id: I1c0facfe54e5aebeb28a54c808b93ddd1cff5125
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 24 Sep 2018 17:27:49 +0000 (19:27 +0200)]
libdlog: separate limiter and dynamic config
Other dynamic features no longer require limiter to be enabled.
Change-Id: I0cbb8b4b2055397afffb23a0132acbb15b319420
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 24 Sep 2018 14:34:40 +0000 (16:34 +0200)]
Rename dynamic filters to dynamic config
Filters are just one of the many config entries and there are plans
to make others available in the dynamic API.
So far this is just a rename with no logic changes. In particular,
the dynamic API is still enabled alongside limiter for the time being.
This is to make actual logic changes easier to track.
Change-Id: I39296f07a0fe9f8c36ac244f9b790e16bdaa173c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Tue, 25 Sep 2018 15:42:51 +0000 (17:42 +0200)]
dlog_logger daemon: make device throttling value buffer-specific
Change-Id: Ib8ffca5500d7eed2a9a83ee5621aa7e29fc0de2d
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Michal Bloch [Fri, 14 Sep 2018 13:53:27 +0000 (15:53 +0200)]
dlog_logger daemon: configurable device throttling
The `logger_dev_throttling` config value controls how many logs
the daemon will try to read at once from an Android Logger device.
Use with caution as this affects how a busy buffer will affect others:
- a higher value means it is more likely to starve them
- a lower one means it can lose logs itself
Change-Id: I7e4e67e64782456a8ee7f4467ab46151a435d3ae
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Hyotaek Shim [Thu, 27 Sep 2018 06:21:31 +0000 (15:21 +0900)]
Change /run/dlog/filters.d permission
(Before)
drwxr-xr-x 2 log log System::Run
(After)
drwxrwxr-x 2 log log System::Shared
...
User::Pkg::org.tizen.privacy-setting System::Run rwxat
^ System::Run rwxat
User System::Run rwxat
User::Shell System::Run rxl
System::TEF System::Run rwxat
System::Privileged System::Run rwxat
_ System::Run rwxat
System System::Run rwxat
...
User::Pkg::org.tizen.privacy-setting System::Shared rxl
User System::Shared rxl
User::Shell System::Shared rxl
System::TEF System::Shared rwxat
System::Privileged System::Shared rwxat
System System::Shared rwxat
/run/dlog/filters.d can only be updated by
1) 'root' shell (System::Privileged)
2) sdbd-forked processes ('log' gid + System)
Change-Id: I25875e09da720ca2d7be08216e1d7b60ee999b36
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
[ Added Smack's transmute xattr to ensure files under filters.d receive appropriate label. ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Michal Bloch [Mon, 17 Sep 2018 14:31:50 +0000 (16:31 +0200)]
dlogctl: make a cleanup function more generic
There's no reason to limit the "free pointer" cleanup just to `char`.
Change-Id: I6fbca39c0f4e76673977a242ab812b96b53eb883
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 19 Sep 2018 14:25:35 +0000 (16:25 +0200)]
dlogctl: document dump mode in help
Change-Id: I6855164bb20b0fafa9eb073088351f2cc4d4e780
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Hyotaek Shim [Wed, 12 Sep 2018 02:04:12 +0000 (11:04 +0900)]
Change /bin/dlogctl permission
-rwxr-x--- log log System::Tools /bin/dlogctl
User System::Tools rx
User::Shell System::Tools rx
System::TEF System::Tools rx
System::Privileged System::Tools rx
System System::Tools rx
Change-Id: If16d7aaa96373748113020c8bdafecceac280714
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
pr.jung [Tue, 11 Sep 2018 05:47:14 +0000 (14:47 +0900)]
Add license file on all rpm packages
Change-Id: I6f6cf183704a834d5894504d01c07d3a7e5bf943
Signed-off-by: pr.jung <pr.jung@samsung.com>
Michal Bloch [Thu, 6 Sep 2018 13:16:41 +0000 (13:16 +0000)]
Merge "dlogfilterctl: add information about rule type when dumping" into tizen
Maciej Slodczyk [Wed, 29 Aug 2018 15:19:34 +0000 (17:19 +0200)]
dlogfilterctl: add information about rule type when dumping
Change-Id: Iae7efbc2150f3dfb73971843438ce12946a27f5a
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Thu, 6 Sep 2018 11:04:33 +0000 (13:04 +0200)]
logctl: add long versions of command line options
Change-Id: Iff071d7240d903268b172b28ab87cc7444623bb3
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Thu, 6 Sep 2018 10:16:09 +0000 (12:16 +0200)]
filters: rename dlogfilterctl to dlogctl
Change-Id: I6dcab12485ca71d9e5ba611d40903334852be24a
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Tue, 4 Sep 2018 15:27:56 +0000 (17:27 +0200)]
testsuite: add extended sorting tests
dlogutil now sorts by timestamp selected by the format
argument. Add relevant tests to the testsuite.
Change-Id: I4b6877c817e803221e804988c886b912185185e7
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
INSUN PYO [Wed, 18 Jul 2018 06:24:49 +0000 (15:24 +0900)]
upgrade: remove unused script files.
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I4e2029364191eec819922c63b79d8fb4e4251005
Michal Bloch [Mon, 3 Sep 2018 11:56:54 +0000 (13:56 +0200)]
Minor dlogfilterctl dump improvements
* fix a resource leak
* make output text consistent with -g
Change-Id: I473198c437bcc6e1476c823deaca7d1170d96e77
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
sanghyeok.oh [Tue, 4 Sep 2018 01:29:56 +0000 (10:29 +0900)]
coverity fix
Change-Id: Idc69a7eb3c3f1d16df0023df3eaf30013539dcd8
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
sanghyeok.oh [Fri, 31 Aug 2018 04:32:21 +0000 (13:32 +0900)]
lcov: added excluding line
Change-Id: If6e9d5f47c784c436d6376f1e03412e0372f32e7
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
Maciej Slodczyk [Wed, 29 Aug 2018 12:36:03 +0000 (14:36 +0200)]
dlogfilterctl: allow dumping all rules
Change-Id: I2f128778561b520a6cf8f8ac767ee8d5579c03d7
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Hyotaek Shim [Wed, 29 Aug 2018 08:48:05 +0000 (17:48 +0900)]
Minor fix on macro api alignment
Change-Id: Ic8f63f1a5f0f231c0c5a23cf9fa59bad1415da92
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Michal Bloch [Wed, 22 Aug 2018 16:41:11 +0000 (18:41 +0200)]
Fix various SVACE static analysis warnings
Change-Id: I1ff2570548bab4e7877380633529ecdc7fafd22a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Tue, 28 Aug 2018 12:02:19 +0000 (14:02 +0200)]
limiter: add a config variable to apply limiter rules to all buffers
Change-Id: I59936632495031b5caee1e8d6ae7821f8b166bfb
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Mon, 27 Aug 2018 14:39:21 +0000 (16:39 +0200)]
Release dlog 5.0.2
- fix missing filters config file error
Change-Id: Ib9e3301cfe9c193b69e913cc22782ffe9b9646fe
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Mon, 27 Aug 2018 09:40:07 +0000 (11:40 +0200)]
filters: don't treat missing config file on startup as an error
Change-Id: I2cea1696d08100a9ad93414271fbf74ba935c867
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Fri, 24 Aug 2018 10:31:33 +0000 (12:31 +0200)]
Release dlog 5.0.1
New features:
- runtime filters configuration
- dlogutil sorting enhancements
Change-Id: I69bed93149a54bc5892f10407d93235a5faefda1
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Fri, 24 Aug 2018 10:22:22 +0000 (12:22 +0200)]
Sort out default filters config file location
Change-Id: I8d2c2ca9a491d8fb50bd639f209e46f3edf1eef6
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Michal Bloch [Thu, 23 Aug 2018 11:07:00 +0000 (13:07 +0200)]
Improve documentation
Change-Id: I6359ddf9e578c49f891083cc3ff31abc7fb90c5c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 3 Aug 2018 18:34:50 +0000 (20:34 +0200)]
util: no sorting if not needed
As long as the log source (the daemon, or Android Logger devices) sorts
logs, util does not have to.
Change-Id: I6262a29bc3db5ae2f43a3aac0a13f45deb215fec
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 3 Aug 2018 18:34:50 +0000 (20:34 +0200)]
Relax sorting constraints
Use a similar timestamp if one is missing instead of
disallowing that sorting altogether.
Change-Id: I31415926535b5ae2f43a3aac0a13f45deb215fec
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 3 Aug 2018 18:13:35 +0000 (20:13 +0200)]
util: sort based on output format
Different output formats use different timestamps.
Util now sorts according to desired format to make sure that
the timestamp shown is consistent.
Change-Id: I685fb209526117f7d17930c71fa751d5005ce803
Maciej Slodczyk [Thu, 2 Aug 2018 09:18:33 +0000 (11:18 +0200)]
util: format out of order message as a log entry
To prevent SDK log parsers errors, when an out of
order message is printed, it has to be formatted
in the same way as other entries.
Change-Id: I004bb4a3d1dc58b1a81f80e668efe71f07987bdf
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Michal Bloch [Wed, 1 Aug 2018 13:02:40 +0000 (15:02 +0200)]
util: use dynamic timestamp-oriented functions
Timestamps are now handled by functions that can choose between the
various timestamp forms. They actual choice is still hardcoded but
now there is a framework to easily change this.
Change-Id: I6a2f63037aae7f31e6ad320cd831595aa44aa00f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 20 Aug 2018 13:13:02 +0000 (15:13 +0200)]
libdlog: log critical runtime filter errors
Change-Id: I4fede410764231bc2507348816c0ba3dbaa01c55
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Wed, 8 Aug 2018 10:26:02 +0000 (12:26 +0200)]
libdlog: runtime filtering tests
Change-Id: Ice1f9f0fe912786b3a830265a0ccf22f601cf42a
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Michal Bloch [Mon, 6 Aug 2018 12:12:53 +0000 (14:12 +0200)]
Add dlogfilterctl: controls dynamic filters
Change-Id: If351b07c112bc3c53e10836f49af16127b29f24a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 20 Aug 2018 13:10:42 +0000 (15:10 +0200)]
limiter: add a way to get applicable rules
Returns all applicable rules, including the shadowed ones so as to know
which rules would be in effect if the currently applicable one was removed.
Change-Id: I32c6bac5cd2ae4506e2c0942989fb19d608a2cb9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 23 Jul 2018 16:35:43 +0000 (18:35 +0200)]
libdlog: runtime filtering
Change-Id: I5d82d5db6022e6d1617ad3414d817376c4429450
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 7 Aug 2018 11:42:45 +0000 (13:42 +0200)]
lidbdlog limiter: allow updating the ruleset
Do not cleanup the ruleset after turning it into a hashmap to allow reuse.
Change-Id: Id45171ba8c60f4f4e39789309276a06208deaef9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 1 Aug 2018 10:37:42 +0000 (12:37 +0200)]
util: cleanup backend reading
Change-Id: I99b7b0d050a5ed66fcc6649f8287692c7929bcdc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 1 Aug 2018 09:38:18 +0000 (11:38 +0200)]
util: disallow mixing KMSG and other buffers
KMSG does not have the REALTIME_SENT timestamp available.
Meanwhile under the Android Logger backend the only timestamp available
is REALTIME_SENT. This makes it impossible to correctly sort logs and
complicates the design.
Change-Id: Ieedce46b2afe2428217c0ce895ba68c2fc77516f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 20 Jul 2018 18:30:14 +0000 (20:30 +0200)]
shared: syslog logging accepts printf-like params
Fixes missing path name in one of the error logs and is convenient.
Change-Id: Ic6aaa86b92f673402aa2bc5095ee5984b9998745
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 3 Aug 2018 09:46:38 +0000 (11:46 +0200)]
shared: add a bunch of sorting helper functions
* sorting order -> clock type mapping
* format -> sorting order mapping
* config -> sorting order getter
Change-Id: I7af5029f7ed9a4ba74bb34f09cc210f625109dd4
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 1 Aug 2018 17:34:12 +0000 (19:34 +0200)]
libdlog limiter: safer pointer handling
The destructor functions now nullify the passed pointer.
This reduces some duplication but more importantly makes
sure there can be no double free.
Improve some precondition checks (asserts).
Change-Id: I21a443aebf6787c1903e971bc5fa5ad706a29612
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 1 Aug 2018 17:17:50 +0000 (19:17 +0200)]
libdlog: isolate limiter creation
Limiter no longer checks whether it is enabled on construction,
it is now the caller's responsibility. This allows to construct
limiter with a limited config (for example containing just the
ruleset) and possibly to add extra rules between deciding to use
the limiter and actually creating it (so that the extras needn't
be loaded if opting out of the feature).
Change-Id: I8e6a4ad06c782f17e47cd5e90a73a150cf327eb3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 1 Aug 2018 16:55:58 +0000 (18:55 +0200)]
libdlog: move limiter functions to loglimiter.c
Change-Id: I6ce8da53239257e1491b4cc184352f2bc596c0e2
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 23 Jul 2018 11:07:25 +0000 (13:07 +0200)]
libdlog limiter: fix duplicate rule handling
A duplicate rule now updates the existing one instead of making a new one.
Change-Id: I96c3f6188495eb8a1eaffd0ac97b6061893a8e77
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 7 Aug 2018 13:36:10 +0000 (15:36 +0200)]
limiter: simplify code
Change-Id: I28644362b8e749aa0df94236d6b98f3ef8658652
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Fri, 6 Jul 2018 12:10:29 +0000 (14:10 +0200)]
daemon: add sorting by selected timestamp
In-daemon sorting feature allowed only to sort entries by
their default send timestamp. This patch adds a config entry
that allows to change that behavior and select a timestamp
to sort by from the list of: send monotonic, send realtime,
receive monotonic and receive realtime.
Change-Id: I28e6f6d714a3793c05934e733e4656e54a482508
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Hyotaek Shim [Tue, 7 Aug 2018 07:56:28 +0000 (16:56 +0900)]
Fix dlog-to-Dlog and Dlogutil-to-dlogutil on documentation
Change-Id: I34c55cf7e5b9a6feacd3b9eee013ad2842dde372
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
sanghyeok.oh [Wed, 25 Jul 2018 02:55:40 +0000 (11:55 +0900)]
svace fix
Change-Id: I61bb4355468d3bb177b0bb35b80a069cf3e6a2b9
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
Karol Lewandowski [Fri, 20 Jul 2018 06:36:10 +0000 (08:36 +0200)]
libdlog: Change prio/tag params order for consistency with other functions
Change-Id: I51cfc0e7b2679a4f551aefb64cbb04665fd14dc4
Michal Bloch [Thu, 26 Apr 2018 11:50:46 +0000 (13:50 +0200)]
util: "generic" functions are actually pipe only
With the removal of binary files, the "generic" functions have
now become pipe-only. Reflect this in their names and location.
Change-Id: I0980d55a1bb573fc447567eaebe2dad48bf7ccfc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Fri, 9 Feb 2018 13:09:28 +0000 (14:09 +0100)]
add monotonic send timestamp when using android backend
feature is experimental and can be enabled/disabled with
autoconf's configure script command line option
Change-Id: I99b35d704789df343cfd051f7984c36d8b602709
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>