Mateusz Majewski [Tue, 6 Jul 2021 08:18:22 +0000 (10:18 +0200)]
Add test for multiple dlog_connect_fd calls
Change-Id: I6454d95e5ee3cc7f5269bfcc9d6d670e128cfa8a
Mateusz Majewski [Thu, 1 Jul 2021 11:13:21 +0000 (13:13 +0200)]
Do not create state->enabled if DLOGUTIL_MODE_NONPRINTING
This would be just an array of all 1s, a waste of memory and a worthless
syscall.
Change-Id: I9ef737bcf417547573d0ec264c1607318381b9c4
Hyotaek Shim [Tue, 22 Jun 2021 06:22:53 +0000 (15:22 +0900)]
Remove unused connect_dlog()
Change-Id: Ie88190a9788b3eda5a7d5ce136073ca5f512f0e7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Mateusz Majewski [Fri, 26 Mar 2021 14:20:36 +0000 (15:20 +0100)]
Make the limiter a self-contained struct
Change-Id: Ic2abf2da2b9e51b596e5612d9ac65044cf4540c4
Mateusz Majewski [Fri, 7 May 2021 10:41:27 +0000 (12:41 +0200)]
Add more useful performance measurements to dlog_cpu
Change-Id: I72353a79666359daf15f5459e7af41284960f716
Mateusz Majewski [Fri, 7 May 2021 10:41:11 +0000 (12:41 +0200)]
Implement stdout benchmark
Change-Id: Ia0fdf1abfbe24db49f65c4ce8b24d1e7fd65279c
Co-authored-by: Michał Bloch <m.bloch@samsung.com>
Mateusz Majewski [Fri, 16 Apr 2021 09:52:01 +0000 (11:52 +0200)]
Allow no fallback mode in dlog_redirect_stdout
Change-Id: Iaeb8a4bda937e3ec696269604de45d65e4702a28
Mateusz Majewski [Wed, 21 Apr 2021 13:13:23 +0000 (15:13 +0200)]
Streamline limiter initialization
Change-Id: I36595e3bca15817b64cfc3ecd2292ac1b15e252a
Mateusz Majewski [Fri, 21 May 2021 12:27:44 +0000 (14:27 +0200)]
Remove an obsolete TODO
This is now done in lines 127-128.
Change-Id: Ida251a29f8e50b635d47fa0856ae360ac9d4cdcc
Mateusz Majewski [Tue, 25 May 2021 09:11:00 +0000 (11:11 +0200)]
Clean up in one place more in dlog_test
Change-Id: If9ba3fdbe27b944f6ed22041b9cb066f6ec89612
Michal Bloch [Wed, 12 May 2021 13:54:53 +0000 (15:54 +0200)]
Remove `libcap` from build requirements
Change-Id: I162a000d65bfb2b0251f83acd1ea3f4048f33004
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 11 May 2021 15:02:14 +0000 (17:02 +0200)]
Fix a use-after-free issue
Change-Id: I96e85f2a8965068108b00f56ed63b2855ac35f6a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 30 Apr 2021 10:22:40 +0000 (12:22 +0200)]
Release 6.5.8
Coverage collection; misc fixes
Change-Id: I4e05562d7505832759ff71b36d07c56d2f639883
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 30 Apr 2021 10:22:02 +0000 (12:22 +0200)]
Remove a redundant piece of code
Change-Id: Ida0b53328dc51b3ed3653b47cbd1e12ead3c329f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Thu, 29 Apr 2021 23:14:53 +0000 (01:14 +0200)]
gcov: Adjust build to Tizen:Gcov OBS project
Change-Id: I080b79f25ce6567cc680dd643a52c9f75e480994
Mateusz Majewski [Fri, 26 Mar 2021 15:56:42 +0000 (16:56 +0100)]
Add '\0'-related stdout redirection tests
Change-Id: Ic5d4432b7d855ca495dd86c66ae166663dd82b36
Mateusz Majewski [Fri, 12 Mar 2021 15:47:03 +0000 (16:47 +0100)]
Add stdout redirection state info to logctl
Change-Id: I776ee15e8d16dd9a8b2b4afe3f9529ae6cc1e8bc
Mateusz Majewski [Tue, 27 Apr 2021 08:06:28 +0000 (10:06 +0200)]
Stop caching the timestamp in the server
Caching the timestamp makes the recv timestamps in the logs slightly
less useful, and the performance gains are questionable.
Change-Id: I71300325622ccc51bfef3cb548ce6e8a725b8429
Mateusz Majewski [Fri, 23 Apr 2021 07:54:35 +0000 (09:54 +0200)]
Fix gcov build error
Change-Id: I09b18f45fa82e0dd68ce2518b16949d47b51f5d7
Michal Bloch [Mon, 19 Apr 2021 10:43:34 +0000 (12:43 +0200)]
Address some static analysis complaints
Change-Id: I365afab682da1f86edde0a59b3e309e951c503be
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Hyotaek Shim [Mon, 12 Apr 2021 11:20:53 +0000 (20:20 +0900)]
[ACR-1631] Add tizen.org/privilege/log, platform-level privilege
Change-Id: Id32ad30218b9a513d7d7302790ea14ca18d8bc11
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Karol Lewandowski [Fri, 16 Apr 2021 08:59:34 +0000 (10:59 +0200)]
Release 6.5.7: Bring back libdlog-devel
It seems moving .pc files between packages (from libdlog to dlog-devel)
causes problems for OBS, so bring back original package name to workaround
this problem.
Change-Id: I945fade0101fdd7cf655b6bb578e7ac865ee67b1
Michal Bloch [Thu, 15 Apr 2021 14:11:36 +0000 (16:11 +0200)]
Release 6.5.6
Fixes stdout redirection newlines; new release for build process issues
Change-Id: If1d21ad260312637684a4282b3f2c9597d29ac83
Michal Bloch [Thu, 15 Apr 2021 13:01:15 +0000 (15:01 +0200)]
Replace "DLOG_ERROR_NOMSG" with an empty message
Change-Id: I279aa7913fc368599439c37b80bf94ca18f5fb61
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 13 Apr 2021 17:22:40 +0000 (19:22 +0200)]
Release 6.5.5
Further development of the stdout redirection feature
Change-Id: I97eb5775d9227ff37a0ce64f816ab629470cbe8e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 13 Apr 2021 14:23:30 +0000 (16:23 +0200)]
Update Android Logger stdout tag setting
Kernel-side development changed the expected data format; conform.
Change-Id: I107b55b195cb9247fcccec7e7d48e646eeb09af8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Tue, 13 Apr 2021 14:14:27 +0000 (14:14 +0000)]
Merge "Decrease an array in tests for Coverity" into tizen
Mateusz Majewski [Tue, 13 Apr 2021 10:18:12 +0000 (12:18 +0200)]
Decrease an array in tests for Coverity
Change-Id: Ia9ecae92608f6ac15754aa6c349145c8fdeac1e6
Mateusz Majewski [Mon, 12 Apr 2021 09:17:32 +0000 (11:17 +0200)]
Replace () with (void) in function prototypes
In C, argumentless functions are declared as receiving (void). It is,
however, more natural to declare them as receiving (). But this means
that the function can receive any number of arguments. This is bad.
We don't want this. We could miss some calls when adding arguments in
a refactor, leading to stack garbage/corruption.
Change-Id: I94732497663937fd3f9d30cea71a2eb966d6f439
Mateusz Majewski [Fri, 9 Apr 2021 10:33:02 +0000 (12:33 +0200)]
Add some basic latency data to logmetrics
To be exact: minimum, maximum, and average difference between sent and
recv timestamps.
Change-Id: Iecd98c2168059924fd986530f3c0de2080110e60
Karol Lewandowski [Mon, 12 Apr 2021 11:26:15 +0000 (13:26 +0200)]
Release 6.5.4
Change-Id: I3065f916ad8cadd78517859e8b568f393b6a3d8e
Michal Bloch [Mon, 12 Apr 2021 10:22:39 +0000 (12:22 +0200)]
Type safety for redirection tags
This was supposed to be self-documenting but it's fairly obvious that
the extra byte is for the terminator and I'm very worried about weird
things that can happen to the char (int promotions or something).
Change-Id: Ib33404db86055fb1840f5942e9740cbf6199d7c3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Mon, 12 Apr 2021 11:51:34 +0000 (13:51 +0200)]
libdlog: Do not export private functions
Change-Id: Iffbf96204be08a5f0d71de8ce93bcfdaf962d056
Karol Lewandowski [Mon, 12 Apr 2021 11:25:02 +0000 (13:25 +0200)]
log-redirect: Deprecate connect_dlog()
connect_dlog() does not use library prefix and is potentially going
to cause name conflict.
Let's remove it when possible.
Change-Id: Ib9769737d33a4cae3d19f1cd49440ea9515c7aea
Michal Bloch [Thu, 8 Apr 2021 12:09:24 +0000 (14:09 +0200)]
Introduce dlog_is_fd_redirected
Checks whether given FD is redirected to dlog.
Change-Id: I71bc905d9c377c5ff6791d39955459d41923a29a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Wed, 7 Apr 2021 12:51:33 +0000 (14:51 +0200)]
Simplify dlog packaging
This commit reduces number of packages by combining
- all libraries - into libdlog package
- all development files - into dlog-devel package
- common files - into 'dlog' package
It does not seem the fine-grained "one library per package"
scheme is useful in Tizen.
Change-Id: I1e0dff4cfb836d5c4872faa9491fdd8b5128dcb3
Michal Bloch [Tue, 6 Apr 2021 12:36:59 +0000 (14:36 +0200)]
Increase config entry field lengths
32 is not enough for limiter rules for long tags.
Examples: CAPI_APPFW_APPLICATION, SAMSUNG_CONNECT_SERVICE.
Change-Id: I296ece081595316f83894e48f28cfe9679f6cecc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 2 Apr 2021 08:06:52 +0000 (10:06 +0200)]
Release 6.5.2
Change-Id: I1c0297c20053d5bcda26c2d4ba86b29ae33102e8
Karol Lewandowski [Fri, 2 Apr 2021 10:39:20 +0000 (12:39 +0200)]
dlog_redirect_stdout: Use internal library
Change-Id: Id54c7df7a5ccbfbe6b2cd8167943b08ea3347080
Mateusz Majewski [Fri, 2 Apr 2021 08:16:49 +0000 (10:16 +0200)]
Rename toggle request to a better name
Change-Id: I6fdeded8caea015c71c7190d7500ec7dae027edf
Mateusz Majewski [Tue, 30 Mar 2021 12:40:50 +0000 (14:40 +0200)]
Move stdout toggle operation to control socket
We put it in the write socket, but this seems to have been a mistake.
Change-Id: I01a483a14b9a87a8b93c530c38af9d4221061541
Karol Lewandowski [Fri, 2 Apr 2021 08:04:31 +0000 (10:04 +0200)]
Use named pipes when creating pipes for clients
Change-Id: I8652af5c2ad623ca39bdba5b77a52ccb29c4cfd3
Karol Lewandowski [Thu, 1 Apr 2021 11:49:16 +0000 (13:49 +0200)]
redirect-stdout: Ensure lines are line buffered
Change-Id: Ibbd677e3680900f94e7431c4c7dd1bb29e76a98b
Karol Lewandowski [Thu, 1 Apr 2021 21:10:52 +0000 (23:10 +0200)]
redirect-stdout: Perform sanity check on paramters passed to public API
Change-Id: I060c05cb88fd834dbf6151e32e0e08056b9e9e9d
Mateusz Majewski [Wed, 31 Mar 2021 11:24:39 +0000 (13:24 +0200)]
Fix a dumb mistake
:hah:
Change-Id: I9cf19dba4dcfadb33eb50f2f046bfa3951004a10
Hyotaek Shim [Tue, 30 Mar 2021 05:44:37 +0000 (14:44 +0900)]
Add extern "C" to dlog-redirect-stdout.h
Change-Id: I331b3db0955909c9f6808c4096fad6da97e04b4b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Michal Bloch [Mon, 22 Mar 2021 15:06:39 +0000 (16:06 +0100)]
Release 6.5.1
Improvements to stdout redirection, incl. support for Android Logger
Change-Id: I7964d2170b86b6fe5803bca41e438a534e6cd695
Karol Lewandowski [Mon, 22 Mar 2021 21:22:35 +0000 (22:22 +0100)]
packaging: Move dlog_redirect_stdout utility to dlogutil package
This is where other utilities are.
Change-Id: I08b1152411d61ce514078df43d8806e72b414888
Michal Bloch [Fri, 19 Mar 2021 12:29:33 +0000 (13:29 +0100)]
Add nominal support for Android Logger in the redirector
Change-Id: I80e2d092723951c4c22b6a47e5e6b81ebb801420
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Mateusz Majewski [Fri, 19 Mar 2021 13:58:21 +0000 (14:58 +0100)]
Simplify stdout redirection logic a bit
The pipe backend is supposed to provide sent timestamps, ie. timestamps
that are as close to log sending time as possible. In libdlog this is
done by taking a timestamp in the sending process and attaching it to
the sent log. Of course stdout redirection can't do this.
Originally, we decided that the best solution is to not attach the sent
timestamps. This would however invalidate some internal assumptions,
which would make some functionality unusable. We were forced to add a
flag which allows users to assert that they won't be using redirection,
which would allow them to continue to use that functionality.
However, there is a simpler solution, which, not unlike magic according
to Penn Jillette (see https://www.youtube.com/watch?v=pd3_HFvQeXQ),
involves lying, cheating, and swindling. In particular, we just make up
a sent timestamp by copying it from the receive timestamp (which is a
timestamp captured in the daemon). This completely ruins the whole point
of the sent timestamp. However, it's still somewhat close to the one we
would get, and the redirection logic gets a tad bit simpler.
Change-Id: I11c6b389ddda88f067a7458e8dac596715fb4cac
Mateusz Majewski [Mon, 22 Mar 2021 09:21:02 +0000 (10:21 +0100)]
Make stdout redirection tests less racey
Those tests are inherently racey: unlike libdlog, stdout redirection
doesn't wait until logs are stored. Therefore, if we launch a redirected
library and then quickly fetch logs, we might see only a part of the
logs. Waiting a second between those two fixes the issue.
Change-Id: I6fed704c4455cfe7cd2ff00a62e8330dfdc0d88e
Michal Bloch [Mon, 15 Mar 2021 11:25:38 +0000 (11:25 +0000)]
Merge "logger: extract signal setup" into tizen
Michal Bloch [Mon, 15 Mar 2021 11:25:38 +0000 (11:25 +0000)]
Merge "Add dlogctl stdout control for pipe" into tizen
Michal Bloch [Mon, 15 Mar 2021 06:13:11 +0000 (07:13 +0100)]
logger: extract signal setup
Change-Id: Ibe5ebdc03f1d6b88b05397d1977e50f77ea10f7b
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Mateusz Majewski [Tue, 9 Mar 2021 14:02:50 +0000 (15:02 +0100)]
Add dlogctl stdout control for pipe
Change-Id: I0d16717f6ca89b21ffa1d7a0c6451268695c4aa6
Michal Bloch [Thu, 4 Mar 2021 21:30:08 +0000 (22:30 +0100)]
Add the toggle stdout request
Change-Id: I3a5f6aaef0ebae87e0d33220d9b2b71c500d1cf6
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 8 Mar 2021 08:15:12 +0000 (09:15 +0100)]
Add buffer::accept_stdout
No logic change so far, just the data field.
Change-Id: Icce69dfa049a4a004bf70fbdcdc87cfc54541d20
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 4 Mar 2021 23:25:13 +0000 (00:25 +0100)]
Make some room among pipe request codes
Peanut brain: encoding N values in N bits
Galaxy brain: encoding N values in log2(N) bits
We're pressured to do this because the request is
encoded as a char so we're running out of bits.
Change-Id: Ide0949886a67e92bb792e612ae0ef3e87f7331a0
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 10 Mar 2021 21:40:23 +0000 (22:40 +0100)]
Redirector binary: user-friendly params/output
* removed --std{out,err}, now --{out,err}tag also enables
* there's now the --help parameter (including -h)
* incorrect parameters and help show extensive usage guide
Change-Id: I990c35720fce5f4fb521a6b8b09fcfb0b739744f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 8 Mar 2021 12:03:27 +0000 (12:03 +0000)]
Merge changes from topic "dlog-stdout-writer-03-2021" into tizen
* changes:
Add basic stdout redirector tests
Flush redirector daemon buffer on error
Make the pipe daemon not drop stdin bytes
Mateusz Majewski [Fri, 5 Mar 2021 16:22:05 +0000 (17:22 +0100)]
Add basic stdout redirector tests
Here are a few integration tests that check if it works, some
basic options, and handling of multiple lines and long lines.
Change-Id: I138c02753a7c8cdf66d9a2a1d1730d39d3fec90d
Mateusz Majewski [Fri, 5 Mar 2021 16:13:12 +0000 (17:13 +0100)]
Flush redirector daemon buffer on error
Unlike the "normal" buffers, messages aren't usually sent completely in
these buffers. Therefore, when we remove the buffer, we should flush
them.
Change-Id: Idb6824e5b7e904463dfc992e3876f85381735ce6
Mateusz Majewski [Fri, 5 Mar 2021 15:08:39 +0000 (16:08 +0100)]
Make the pipe daemon not drop stdin bytes
The daemon part of the stdin redirection wrongly assumed that the log
will always fit to the structure. If it didn't the part that fit was
written, but all bytes were removed from the input buffer, which
resulted in dropping all the extra bytes. This commit fixes that by
dropping the exact right amount of bytes.
Change-Id: I48fc9f80b2b617a442b5c5d654d474449a10af8c
Mateusz Majewski [Mon, 1 Mar 2021 17:32:06 +0000 (18:32 +0100)]
Improve the pipe backend stdout writer
Change-Id: I4fae8ae6e977f15db43e08a51020e6acc71a0310
Mateusz Majewski [Mon, 1 Mar 2021 15:52:02 +0000 (16:52 +0100)]
Add dlog-config-enable-redirector-for-pipe
Change-Id: I972e085414e91da94bc90976a6cebccf5ef0bc2f
Michal Bloch [Wed, 24 Feb 2021 13:42:41 +0000 (14:42 +0100)]
Release 6.5.0
Adds the stdout redirector and acknowledges Tizen 6.5
Change-Id: I1d997e1725777310e83d6ca991c1c0ccdc57fee8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Mateusz Majewski [Wed, 17 Feb 2021 14:21:43 +0000 (15:21 +0100)]
Add redirector binary and lib
Change-Id: I704c8d0eda44accd1692464f592e3476868f28b8
Mateusz Majewski [Tue, 16 Feb 2021 12:55:20 +0000 (13:55 +0100)]
Add stdout redirection support to the daemon
Change-Id: Icca4761c9f22d7b4c4a899118d7a763b8bb49612
Mateusz Majewski [Tue, 16 Feb 2021 11:35:17 +0000 (12:35 +0100)]
Add enable_redirector_for_pipe option
… along with supported documentation and required libdlogutil support.
Change-Id: Ic5c23f6f480a3f25e504ee5afc47d06d8a5e7ab4
Mateusz Majewski [Tue, 16 Feb 2021 10:33:00 +0000 (11:33 +0100)]
Don't explode when logs lack the timestamp
Change-Id: I255d8c6d03f218c17b66e8f40285e5c4c232f6bf
Michal Bloch [Mon, 15 Feb 2021 14:02:22 +0000 (15:02 +0100)]
Change connect_pipe to get dlog_control_msg struct by pointer
As this struct has a flexible array member, a pointer fits better.
Change-Id: I6df7c1c372ea0f061bca05faf9538713c77f8a75
INSUN PYO [Thu, 18 Feb 2021 04:37:48 +0000 (13:37 +0900)]
Remove unused Requires(posttrans) dependencies
posttrans was removed by "Move config files from /opt/etc to /etc" commit.
Change-Id: Ic69b8301a8d1ac517cacbe1b57a34d9b1c7fa6fe
Mateusz Majewski [Thu, 11 Feb 2021 11:02:36 +0000 (12:02 +0100)]
Correct the documentation of available timestamps
Change-Id: I4457d59f082f80bf997cc464509a1e0c497657df
Michal Bloch [Wed, 4 Nov 2020 21:23:41 +0000 (22:23 +0100)]
libdlogutil: reorder parameter checks
Some cases in which TIZEN_ERROR_INVALID_PARAMETER would be returned
will now do so without crashing (specifically, those where the state
pointer segfaults but another parameter is also invalid).
This affects some negative tests.
Change-Id: I8761375880bc8b5c92e5590c632beb64988259fe
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 18 Nov 2020 11:13:46 +0000 (12:13 +0100)]
Drop some unused value setting
Change-Id: I05ed35832c8f28688ce8ced572010ef54ade8ee8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 18 Nov 2020 10:58:41 +0000 (11:58 +0100)]
Add an assert() to a scary-looking buffer indexing
Static analysis had some worries about a buffer overrun here.
Change-Id: I0698ff87c9763c4752f28acd4ad2e4e0953664d4
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 19 Jan 2021 19:44:19 +0000 (20:44 +0100)]
Be more assertive regarding request types
Dispatchers now exist so a type mismatch should never happen.
Change-Id: Ife09ed700e20375dabef165b3878c48de1adeaa5
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 18 Jan 2021 14:59:32 +0000 (15:59 +0100)]
Add a basic write-socket request dispatcher
In anticipation of new request types for that socket type.
Change-Id: I9cd8e1035f8c225158b9717e81469c1e5e1d17cd
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Mateusz Majewski [Wed, 27 Jan 2021 09:13:43 +0000 (10:13 +0100)]
Move the connect_pipe function to a separate file
Change-Id: I22e000667bdcb34b504c1f166223c0f74bfdbeaa
Mateusz Majewski [Fri, 22 Jan 2021 10:10:08 +0000 (11:10 +0100)]
Remove a useless field
An artifact of the past.
We don't want to have this field, since we want to add the stdout mode.
But logs using such mode don't have any send timestamp, so there is
nothing reasonable to put in this field.
Change-Id: Ie4173fe81294e42564a5865fd9a0210f5684331a
Mateusz Majewski [Wed, 20 Jan 2021 14:01:22 +0000 (15:01 +0100)]
Add some documentation on dlog_logger interface
Change-Id: I94288a407f8b19e4cef784b2d7fbc4b8c8d7bf78
Hyotaek Shim [Thu, 17 Dec 2020 04:42:30 +0000 (13:42 +0900)]
Modify documentation about dlog priorities
Change-Id: If0ec7301de496fc5060a118b311ed61565e2a3ff
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Michal Bloch [Tue, 8 Dec 2020 18:09:18 +0000 (19:09 +0100)]
Ignore QoS write errors more explicitly
Change-Id: I98c5a995565f3b31bdda6859aed50271ac67b8c3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 4 Dec 2020 13:58:43 +0000 (13:58 +0000)]
Merge "Move some headers into better places" into tizen
Mateusz Majewski [Fri, 4 Dec 2020 12:57:48 +0000 (13:57 +0100)]
Move some headers into better places
Change-Id: Ib01dfeb49092e26eab27f9a3ca39d5ea82eb5013
Karol Lewandowski [Wed, 25 Nov 2020 10:45:12 +0000 (11:45 +0100)]
libdlog: Allow disabling critical logs
Critical log can be disabled like other buffers:
enable_critical=0
The default is to enable critical log buffer and function.
Change-Id: I7ce36638213b275c302ada18437cc911bb68548b
Michal Bloch [Wed, 26 Aug 2020 11:08:55 +0000 (13:08 +0200)]
logger: extract privilege related code
Change-Id: I7cd79b564227bb5b7479d04248430ae457b34b46
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 9 Nov 2020 19:45:37 +0000 (19:45 +0000)]
Merge "Add logger daemon write buffering tests" into tizen
Michal Bloch [Fri, 6 Nov 2020 18:11:21 +0000 (19:11 +0100)]
Threadtime format: ensure space after tag
The padding is only added for tags shorter than 8 characters.
This means that tags 8 characters or longer do not have any
whitespace between the tag and the bracket at the moment.
Tizen® Studio™ Dynamic Analyzer™ seems to expect whitespace there
to process a log correctly and I have come to believe that it drops
messages with longer tags. Not that it's any of our concern (since
technically their rule is broken), but that rule is actually fairly
sensible so we may as well adopt it.
Change-Id: I8e32fc9c5cdbd8db9d042fb7213596f85284eb41
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Mateusz Majewski [Fri, 6 Nov 2020 10:56:54 +0000 (11:56 +0100)]
Fix the short tag case
Change-Id: Ie9a05377a40994bfc3a012d28fb17dfdc69706b6
Adrian Szyndela [Fri, 6 Nov 2020 08:38:21 +0000 (09:38 +0100)]
logprint: bring back line breaks in all remaining formats
The commit
efa5c1ff changed tests behavior for inline warnings
however this was made due to some mistakes, mainly this one:
- line break tests were incomplete, they tested only few formats;
this led me to think that these were the only formats that should
be prefixed with the tag on every line. It wasn't true.
This commit fixes the formats by:
- switching the formats' line breaking behavior;
- adding line breaks tests for every missing format;
- bringing back the original inline warning tests.
Change-Id: If6db7b548e9ab1a0d6395968ee512447558afc1f
Adrian Szyndela [Thu, 5 Nov 2020 15:16:25 +0000 (16:16 +0100)]
logprint: make threadtime format print metadata in every line
This brings back previous formatting for the threadtime format,
which was changed with rewriting log_print_log_line().
Additionally, it adds tests for such case, fixes inline warning test,
AND poses questions if more formats are affected by the rewrite.
And maybe commit
efa5c1ff gives some hints for that.
Change-Id: I55470f397fd45fba61b8a68d58b1d9cd7f3e8257
Mateusz Majewski [Thu, 5 Nov 2020 06:26:57 +0000 (07:26 +0100)]
Add logger daemon write buffering tests
Change-Id: I27cf20c553297532fde2f7ae51c9260cc084489d
Michal Bloch [Tue, 3 Nov 2020 18:58:58 +0000 (19:58 +0100)]
Fix compilation on 64-bit targets
Change-Id: I1da090652bbac925be2519f6137558f813d0724f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 3 Nov 2020 15:36:23 +0000 (15:36 +0000)]
Merge "Unify logger and pipe tests a bit" into tizen
Mateusz Majewski [Tue, 3 Nov 2020 12:03:33 +0000 (13:03 +0100)]
Unify logger and pipe tests a bit
Change-Id: I62beb09c8f00e3083037f655bf95be8684911aec
Mateusz Majewski [Fri, 9 Oct 2020 14:47:48 +0000 (16:47 +0200)]
Enable -Wall
🎉
Change-Id: I3827def56eab6042d2024083fe8ce31bf99735aa
Agnieszka Baumann [Tue, 8 Sep 2020 10:24:29 +0000 (12:24 +0200)]
Warn when log is duplicated X times
Change-Id: I9302cd761a7de0f090a35940f47ef38de19ba9fa
Mateusz Majewski [Tue, 27 Oct 2020 08:57:13 +0000 (09:57 +0100)]
Fix QoS division by 0
While the count_above_threshold does have a check for 0, it doesn't do
what we want; we want it to return an infinite value somehow, but it
instead returns the dividend. This patch checks for this case and
returns the correct value manually.
The reason why it is important to return infinite value in this case is
that this division is supposed to always increase the threshold value.
Usually it does that correctly, since remaining_throughput has been
decreased by only those values that were under the average value, and
count_above_threshold has been decreased by count of those values.
Therefore, the result of the division is the average of all the values
that weren't lower than the previous average, and this average obviously
can't be lower than the previous average. However, if all the values are
under the average, the new average doesn't exist. It's morally infinite,
but the division instead returns the remaining_throughput, which is
obviously much lower than the original throughput, and often lower than
the threshold value. For example, if throughput is 20 and we have one
log source having written 18 logs, the result will be 2, which is wrong.
Change-Id: Id6d085707aeabc4032f931869c213f01db2c927a
Mateusz Majewski [Tue, 27 Oct 2020 11:49:21 +0000 (12:49 +0100)]
Remove time travel
This commit fixes a bug in which some logs come to the pipe backend with
receipt timestamp earlier than sending timestamp.
Change-Id: I6c93cfa97547f89d6c55a4d1767322f64fe8fb5f