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
INSUN PYO [Thu, 8 Oct 2020 08:22:40 +0000 (17:22 +0900)]
Add Requires=local-fs.target dependency to dlog_logger.service
In emergency mode, local-fs.target always fails.
So, you have to check if local-fs.target is successful.
Change-Id: I6094ee7c585e62179d12e83ee36c9462491e6226
Mateusz Majewski [Tue, 13 Oct 2020 11:00:08 +0000 (13:00 +0200)]
Fix QoS blocking too many logs
The original implementation of QoS had some logic errors which made it
allow too few logs. This commit fixes those logic errors, and raises
the limit in the integration tests accordingly.
Change-Id: Ia2591eca30fa5518575c0889fc7fa9d4e6bc1e54
Mateusz Majewski [Fri, 16 Oct 2020 07:07:14 +0000 (09:07 +0200)]
Update the overview file
Change-Id: Idd6a56f7543186112f9ce82bfa4d6edc3c094acc
Mateusz Majewski [Thu, 15 Oct 2020 12:18:28 +0000 (14:18 +0200)]
Do not prepare for printing if not going to print
The prepare_print function assumes that we are going to print. In
particular, it can disable buffers at will if they aren't going to be
printed. This can be problematic if we want to clear those buffers.
Change-Id: Ibe13a21cf0b599340d6404be569a2199bb3be9bc
Mateusz Majewski [Thu, 15 Oct 2020 11:54:52 +0000 (13:54 +0200)]
Make sure a mode isn't set if we want to use fetch operations
Change-Id: Ida4603727554c721eb03c0ea22b543c6cb83c39d
Mateusz Majewski [Thu, 15 Oct 2020 09:53:41 +0000 (11:53 +0200)]
Make sure the buffer is enabled before querying it
Otherwise, the operation might segfault.
Change-Id: I7ba7e8fab50bc9bb3cbfa26e8ebbd086bfc2b4e9
Mateusz Majewski [Wed, 14 Oct 2020 12:14:02 +0000 (14:14 +0200)]
Fix some cases of data loss caused by partial writes
Change-Id: Ibce508fac5f674041547253ebc8ad6fe6c64d649
Mateusz Majewski [Wed, 14 Oct 2020 06:26:50 +0000 (08:26 +0200)]
Remove some obsolete TODOs
We now have a separate option parser, which doesn't use dlogutil_config
for reusability. Also, the logger does have the flush functionality
already (see flush_logfile_timely in logger.c).
Change-Id: Iefbac63e499b22b2b359710be76b65dd4a55af39
Mateusz Majewski [Fri, 9 Oct 2020 14:46:10 +0000 (16:46 +0200)]
Make some functions static only outside of unit tests
Change-Id: I92bad069655456172cef67d1da37463567e6303e
Mateusz Majewski [Fri, 9 Oct 2020 14:45:20 +0000 (16:45 +0200)]
Make sure a function is only declared when it's actually defined
Change-Id: I974d9b984260940c94dd7dca9704a77e8511a239
Mateusz Majewski [Fri, 9 Oct 2020 14:03:32 +0000 (16:03 +0200)]
Fix function formatting
Change-Id: Id9058c6480d1a463f09ff9effe78d29575f2fdad
Mateusz Majewski [Fri, 9 Oct 2020 13:39:58 +0000 (15:39 +0200)]
Improve src/tests/logutil.c
Change-Id: Ied5c4a0f846f36d8941f4a1b492f76d3fd1468e4
Mateusz Majewski [Fri, 9 Oct 2020 12:47:22 +0000 (14:47 +0200)]
Use the sizeof(*ptr) pattern more consistently
It allows the code to withstand type changes slightly better.
Change-Id: I143806c54528e8cf30d18526b7a481280665ac6b
Mateusz Majewski [Fri, 9 Oct 2020 12:05:11 +0000 (14:05 +0200)]
Learn to count to 9
Change-Id: I2fd23c61a793aadaea1bad5f9be32c6ca38485d0
Mateusz Majewski [Fri, 9 Oct 2020 11:47:30 +0000 (13:47 +0200)]
Fix various formatting issues
Change-Id: Ie6352f4b13f1eba6b2fb808b92efd1b8560495fe
Mateusz Majewski [Thu, 8 Oct 2020 11:59:03 +0000 (13:59 +0200)]
Add some docs
Change-Id: I7132296bddf6ce1095184f7a8db4e510adaebacb
Mateusz Majewski [Thu, 8 Oct 2020 07:33:58 +0000 (09:33 +0200)]
Put critical logs in the main buffer in the tests
Otherwise, the logger verbose tests emit an error.
Change-Id: Id5cdd781c3b4fa42da736fe2207837528416eec9
Michal Bloch [Fri, 2 Oct 2020 15:05:07 +0000 (15:05 +0000)]
Merge "Miscellaneous fixes" into tizen
Karol Lewandowski [Fri, 2 Oct 2020 09:59:53 +0000 (11:59 +0200)]
configure: fix typo
Change-Id: Ib08aa4467566712a45e2c5e791ec3bff6557c13f
Michal Bloch [Wed, 26 Aug 2020 10:51:56 +0000 (12:51 +0200)]
Miscellaneous fixes
Change-Id: I0245f509fa4e4c9b2ddf2d25ff823d486d7e7ae8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 28 Aug 2020 17:20:02 +0000 (19:20 +0200)]
libdlogutil: relicense to MIT
Change-Id: Ic9fe65de28a03e00ab954f7752dc13bbda5cae7e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 2 Oct 2020 11:06:36 +0000 (13:06 +0200)]
Remove AOSP licenses
As far as we are aware no AOSP code is left; possibly some trivial snippets
trace their origins to AOSP but I don't think anybody is going to complain
over one-liners.
Change-Id: I191add3a0348f7b7979977f2f80cef3f429acca3
Mateusz Majewski [Mon, 28 Sep 2020 10:11:00 +0000 (12:11 +0200)]
Make sure no partial UTF-8 encodings are left in the metadata
Change-Id: Ic02d5b13a3847a7231631782def6dc670082165a
Adrian Szyndela [Thu, 1 Oct 2020 11:14:07 +0000 (13:14 +0200)]
tests: fixed typo
Change-Id: I9fe7eedfd5f12fd7a4c8abf9887b059b5efcf4e4
Mateusz Majewski [Mon, 28 Sep 2020 08:21:02 +0000 (10:21 +0200)]
Reuse util's parser in the logger daemon
Change-Id: Ic3a73bf332b6359265a9727a46f2fdaf415d3d77
Mateusz Majewski [Fri, 25 Sep 2020 13:06:18 +0000 (15:06 +0200)]
Make the portable parser resetable
Change-Id: I34531397651f5a2e6c315ea2b0888c4a67dd3a37
Mateusz Majewski [Fri, 25 Sep 2020 11:03:31 +0000 (13:03 +0200)]
Move the util parser outside of util so we can reuse it
Change-Id: Icec52e46925923e549850ad9f10f221f7e363dfc
Michal Bloch [Wed, 16 Sep 2020 13:56:17 +0000 (15:56 +0200)]
Rewrite `log_add_filter_rule()`
* the last ':' delimiter is now taken instead of the first.
For example `FOO:::BAR:E` is now tag `FOO:::BAR` with prio `E`
instead of tag `FOO` and priority `::BAR:E`.
* fixes a memleak on `list_add()` failure.
* removes AOSP license because this was the last piece of AOSP code.
Change-Id: I6a94382cd6a1d3b175c5daf71b566dec4ba28717
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Mateusz Majewski [Fri, 18 Sep 2020 09:05:26 +0000 (11:05 +0200)]
Make util's option parsing more modular
Will be helpful in making the logger daemon use this implementation too
instead of having its own implementation (DRY!).
Change-Id: I899923f4299d6a4604526d3bafb8c5ee60029d39
Michal Bloch [Fri, 25 Sep 2020 06:20:13 +0000 (08:20 +0200)]
ptrs_list: list_clear family accepts NULLs
Change-Id: Id41135a151fcc354dbe6d7556ddb2cd98eb5f581
Signed-off-by: Michal Bloch <m.bloch@samsung.com>