platform/core/system/dlog.git
7 years agoMerge branch 'tizen' into tizen_3.0 97/95397/1
Kichan Kwon [Thu, 3 Nov 2016 06:07:45 +0000 (15:07 +0900)]
Merge branch 'tizen' into tizen_3.0

Change-Id: I98d5ebe3e300b509efe05bf78edb567b047dad55
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRelease up 96/95396/1
Kichan Kwon [Thu, 3 Nov 2016 06:07:27 +0000 (15:07 +0900)]
Release up

Change-Id: I2b1e73073cb787f0fd82e991eadc41e6eac490b2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoTests: add a unit test for pipe message creation. 85/92985/13 accepted/tizen/3.0/common/20161114.081302 accepted/tizen/3.0/ivi/20161103.044935 accepted/tizen/3.0/mobile/20161103.044834 accepted/tizen/3.0/tv/20161103.044854 accepted/tizen/3.0/wearable/20161103.044914 accepted/tizen/common/20161103.155847 accepted/tizen/ivi/20161103.230602 accepted/tizen/mobile/20161103.230507 accepted/tizen/tv/20161103.230524 accepted/tizen/wearable/20161103.230542 submit/tizen/20161103.010653 submit/tizen_3.0/20161103.010811 submit/tizen_3.0_common/20161110.084657
Michal Bloch [Wed, 19 Oct 2016 16:12:14 +0000 (18:12 +0200)]
Tests: add a unit test for pipe message creation.

Change-Id: Ic95a7abea1d9933a42605c8f192d2093deb8b80c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoPipe: move validity check to the dedicated area 32/93532/6
Michal Bloch [Mon, 24 Oct 2016 19:54:13 +0000 (21:54 +0200)]
Pipe: move validity check to the dedicated area

  Ideally, this series of checks (null message, total length, priority bounds)
  would be a separate function shared by all back-ends. This will be done in a
  further commit.

Change-Id: I853c64a32e3ba5e6a72b28b5075f4fca39d6a15f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoCheck our privilege. 84/92984/11
Michal Bloch [Wed, 19 Oct 2016 15:40:33 +0000 (17:40 +0200)]
Check our privilege.

Make sure the privilege reset succeeds.

Change-Id: Ic88703c2ac8d69eb1a173526c60363ba319820c6
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoMerge "Set proper executable bits" into tizen
Karol Lewandowski [Thu, 27 Oct 2016 14:43:57 +0000 (07:43 -0700)]
Merge "Set proper executable bits" into tizen

7 years agoSet proper executable bits 33/93533/4
Michal Bloch [Mon, 24 Oct 2016 20:08:17 +0000 (22:08 +0200)]
Set proper executable bits

 * add to scripts/dlog_upgrade.sh

 * remove from plaintext files; this includes source code,
   configuration, header, image, manifest, service, and other
   miscellaneous (eg. license) files (specifically, all files
   touched by this commit except scripts/dlog_upgrade.sh)

Change-Id: Icc1496147c5e78347dff8af5eade3c6cfe13bffd
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agodlogutil : print logs stored for long time 63/92963/4 accepted/tizen/common/20161025.155023 accepted/tizen/ivi/20161028.151055 accepted/tizen/mobile/20161028.151042 accepted/tizen/tv/20161028.151048 accepted/tizen/wearable/20161028.151052 submit/tizen/20161025.084539 submit/tizen_3.0_common/20161104.104000
Kichan Kwon [Wed, 19 Oct 2016 13:07:21 +0000 (22:07 +0900)]
dlogutil : print logs stored for long time

- If any logs don't be written, some logs stored most currently can't be printed
- When remainder logs haven't printed for long time,
 it will be printed without written time

Change-Id: Id51f0a2a078e74f1f568d863b8abd78711d781d5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agodlogutil : modify timeout when dlogutil decides to terminate 27/92927/3 accepted/tizen/3.0/ivi/20161028.133954 accepted/tizen/3.0/mobile/20161028.133111 accepted/tizen/3.0/tv/20161028.133415 accepted/tizen/3.0/wearable/20161028.133719 accepted/tizen/common/20161019.145845 accepted/tizen/ivi/20161019.142322 accepted/tizen/mobile/20161019.142236 accepted/tizen/tv/20161019.142253 accepted/tizen/wearable/20161019.142310 submit/tizen/20161019.111037 submit/tizen_3.0/20161028.062323 submit/tizen_3.0/20161028.082423
Kichan Kwon [Wed, 19 Oct 2016 10:42:52 +0000 (19:42 +0900)]
dlogutil : modify timeout when dlogutil decides to terminate

- When "-d" or "-t" option is applied, dlogutil is terminated
 after printing remainder in the buffer.

- However, if the time interval with current log and last log
 is less than timeout, current log can't be printed.

- Therefore, timeout should be zero after decision.

- In addition, to prevent the situation that dlogutil can't decide
 because of continuous logs, waiting timeout also be decreased.

Change-Id: Ia29d083c402263163573c58f33ce976a665e1070
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoDisable to log to console & stdout for syslog 25/92525/2 accepted/tizen/common/20161018.175101 accepted/tizen/ivi/20161018.091532 accepted/tizen/mobile/20161018.091448 accepted/tizen/tv/20161018.091501 accepted/tizen/wearable/20161018.091516 submit/tizen/20161018.022246
Kunhoon Baik [Mon, 17 Oct 2016 08:51:54 +0000 (17:51 +0900)]
Disable to log to console & stdout for syslog

Change-Id: I7ff528856ee35e4f8883edbd18f592038dfc9085

7 years agodlogutil : check elapsed time by comparing both ends 28/92628/3
Kichan Kwon [Mon, 17 Oct 2016 15:37:05 +0000 (00:37 +0900)]
dlogutil : check elapsed time by comparing both ends

- Pipe backend uses clock_gettime and Logger backend uses current_kernel_time
- Because dlogutil uses clock_gettime, it can't check elapsed time at the Logger backend
- Therefore, for portability, dlogutil doesn't record current time

- To prevent underflow, use long variables

Change-Id: I32a11e8518526e24953a5dcd414b8c634ad3d778
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge changes Ib648c1bf,Idb9716c8 into tizen
Karol Lewandowski [Mon, 17 Oct 2016 14:00:20 +0000 (07:00 -0700)]
Merge changes Ib648c1bf,Idb9716c8 into tizen

* changes:
  dlog_logger: Drop redundant User/Group settings
  dloginit: Execute dloginit service with all filesystems mounted

7 years agoMerge "Micro-optimisation" into tizen
Karol Lewandowski [Mon, 17 Oct 2016 13:59:22 +0000 (06:59 -0700)]
Merge "Micro-optimisation" into tizen

7 years agoMerge "Fix device file path" into tizen
Karol Lewandowski [Mon, 17 Oct 2016 13:56:01 +0000 (06:56 -0700)]
Merge "Fix device file path" into tizen

7 years agoFix a deadlock 64/92364/2
Michal Bloch [Fri, 14 Oct 2016 16:31:27 +0000 (18:31 +0200)]
Fix a deadlock

Change-Id: I606ebf58c071be4974be58933799d1aadc214342
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoFix device file path 47/92247/1
Kichan Kwon [Fri, 14 Oct 2016 06:21:30 +0000 (15:21 +0900)]
Fix device file path

Change-Id: If1dd8abde1bb68f63b04e2fc19ec6be9a529432f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agodlog_logger: Drop redundant User/Group settings 94/91994/7
Karol Lewandowski [Wed, 12 Oct 2016 11:12:27 +0000 (13:12 +0200)]
dlog_logger: Drop redundant User/Group settings

User and Group default to root for system services.

Additionally, reformat note about TZ variable setting.

Change-Id: Ib648c1bf47169c3da5476e4612e11b5d8826ded3

7 years agodloginit: Execute dloginit service with all filesystems mounted 93/91993/7
Karol Lewandowski [Wed, 12 Oct 2016 11:08:15 +0000 (13:08 +0200)]
dloginit: Execute dloginit service with all filesystems mounted

dloginit needs access to /opt/etc/dlog.conf for it to read
administrator-provided config correctly.

Change-Id: Idb9716c80786a721b54bf5f67a7cc38065feeb59

7 years agoMicro-optimisation 23/92023/4
Michal Bloch [Wed, 12 Oct 2016 14:44:55 +0000 (16:44 +0200)]
Micro-optimisation

Change-Id: I790920282f4d6b4857d3a5b0535e5a9c202c8a70
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoReport meddling with libdlog internal state 69/91669/10
Michal Bloch [Mon, 10 Oct 2016 16:56:03 +0000 (18:56 +0200)]
Report meddling with libdlog internal state

Change-Id: Ife49638d2f0f7fdca69b015d51ed8c30e3a32834
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoExtract message creation to a separate function 80/91680/7
Michal Bloch [Mon, 10 Oct 2016 16:36:17 +0000 (18:36 +0200)]
Extract message creation to a separate function

Change-Id: I03a99b40599164f7eb595e0824e02551c17e7462
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoMerge "Fix code issues found by cppcheck." into tizen
Karol Lewandowski [Thu, 13 Oct 2016 09:56:43 +0000 (02:56 -0700)]
Merge "Fix code issues found by cppcheck." into tizen

7 years agoMerge "Add unit tests." into tizen
Karol Lewandowski [Thu, 13 Oct 2016 09:53:34 +0000 (02:53 -0700)]
Merge "Add unit tests." into tizen

7 years agoMerge topic 'dlog-pipe-fix' into tizen
Karol Lewandowski [Wed, 12 Oct 2016 09:45:56 +0000 (02:45 -0700)]
Merge topic 'dlog-pipe-fix' into tizen

* changes:
  pipe: Only take up file descriptors when needed
  pipe: Fix multithreaded pipe file descriptor reacquisition
  Ensure dlog is started before regular Tizen services wanting to use it
  Prevent segmentation faults and memory leaks
  Fix libdlog initialization with multiple threads

7 years agoFix code issues found by cppcheck. 91/91091/7
Michal Bloch [Wed, 5 Oct 2016 15:39:38 +0000 (17:39 +0200)]
Fix code issues found by cppcheck.

Change-Id: I79547320b0bb566efba904163094861d7514e83d
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoAdd unit tests. 84/91084/8
Michal Bloch [Fri, 23 Sep 2016 13:35:16 +0000 (15:35 +0200)]
Add unit tests.

Change-Id: Ic1c02937f6cf6577ce63aa5961f76a5b54f0af99
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agopipe: Only take up file descriptors when needed 87/90587/10
Michal Bloch [Fri, 30 Sep 2016 14:23:58 +0000 (16:23 +0200)]
pipe: Only take up file descriptors when needed

Change-Id: I7ade660e8e2273654ed8b782f42870824b33256e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agopipe: Fix multithreaded pipe file descriptor reacquisition 86/90586/11
Michal Bloch [Fri, 30 Sep 2016 14:18:43 +0000 (16:18 +0200)]
pipe: Fix multithreaded pipe file descriptor reacquisition

Change-Id: I6d64a9f9adea2334dcaa67cbe2e6c6d98cb58b45
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoEnsure dlog is started before regular Tizen services wanting to use it 66/90566/7
Karol Lewandowski [Thu, 29 Sep 2016 19:28:28 +0000 (21:28 +0200)]
Ensure dlog is started before regular Tizen services wanting to use it

Change-Id: I9b80c2ae97b428be3309fbc30eb000d7f8716fa9

7 years agoPrevent segmentation faults and memory leaks 92/90392/7
Michal Bloch [Thu, 29 Sep 2016 15:58:52 +0000 (17:58 +0200)]
Prevent segmentation faults and memory leaks

Change-Id: I51125aa059f028280f21cde2e72053f81ecfdbb6
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoUpdate release number 05/91805/1 accepted/tizen/common/20161011.154529 accepted/tizen/ivi/20161012.065107 accepted/tizen/mobile/20161012.065023 accepted/tizen/tv/20161012.065036 accepted/tizen/wearable/20161012.065052 submit/tizen/20161011.114524
Kichan Kwon [Tue, 11 Oct 2016 11:37:27 +0000 (20:37 +0900)]
Update release number

Change-Id: Ib6768d7516b56a717577846ec493dce855a9fbb7
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge "dlogutil : fix that some logs overtake previous logs having same time" into...
Kichan Kwon [Tue, 11 Oct 2016 11:32:40 +0000 (04:32 -0700)]
Merge "dlogutil : fix that some logs overtake previous logs having same time" into tizen

7 years agodlogutil : fix that some logs overtake previous logs having same time 41/91641/2
Kichan Kwon [Mon, 10 Oct 2016 12:38:30 +0000 (21:38 +0900)]
dlogutil : fix that some logs overtake previous logs having same time

- Two logs can be written at the same time (having same sec and nsec)
- In this case, the log written afterward should be located backwardly

Change-Id: Id6d36d91606cfa5c2621a8d591303e7d4d0d45a7
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge "pipe: Also reconnect when last write was for bad fd" into tizen
Karol Lewandowski [Tue, 11 Oct 2016 10:42:55 +0000 (03:42 -0700)]
Merge "pipe: Also reconnect when last write was for bad fd" into tizen

7 years agoFix libdlog initialization with multiple threads 90/90390/6
Karol Lewandowski [Thu, 29 Sep 2016 18:45:09 +0000 (20:45 +0200)]
Fix libdlog initialization with multiple threads

The backup null log handler is now set only on initialisation failure
instead of always being set at the beginning and overridden later.

The initialisation check does not care which particular handler is installed,
so threads which attempted to write a log while another thread was carrying out
initialisation could be directed to the null handler.

Change-Id: I3aaf6dcad8f72611e413969d48f0f68d44a7c308

7 years agopipe: Also reconnect when last write was for bad fd 91/90391/4
Karol Lewandowski [Thu, 29 Sep 2016 19:32:07 +0000 (21:32 +0200)]
pipe: Also reconnect when last write was for bad fd

Change-Id: Iaf7f2fe44383a0395fd7199564aa3a28cf44298d

7 years agoVersion up 05/91205/2 accepted/tizen/3.0/mobile/20161015.032633 accepted/tizen/3.0/tv/20161016.004025 accepted/tizen/3.0/wearable/20161015.081926 accepted/tizen/common/20161006.153832 accepted/tizen/ivi/20161007.103817 accepted/tizen/mobile/20161007.103800 accepted/tizen/tv/20161007.103811 accepted/tizen/wearable/20161007.103807 submit/tizen/20161006.084312 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
Kichan Kwon [Thu, 6 Oct 2016 08:37:27 +0000 (17:37 +0900)]
Version up

Change-Id: Id13303c2ea8149a0441b317eab16d0890f42ff70
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge "dlogutil : sort logs regardless of backend" into tizen
Kichan Kwon [Thu, 6 Oct 2016 08:34:31 +0000 (01:34 -0700)]
Merge "dlogutil : sort logs regardless of backend" into tizen

7 years agodlogutil : sort logs regardless of backend 69/89969/3
Kichan Kwon [Wed, 28 Sep 2016 02:19:28 +0000 (11:19 +0900)]
dlogutil : sort logs regardless of backend

Change-Id: Idef92cb357a863b763162fd51d08ecbe241fba3b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoAdd path variable in the script file. 93/90693/2
Kichan Kwon [Tue, 4 Oct 2016 01:44:37 +0000 (10:44 +0900)]
Add path variable in the script file.

- For security issue

Change-Id: I958ceeae59b681b501cab420eb99e88b24cc60bd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge "pipe: Fix recvmsg() error handling" into tizen
Karol Lewandowski [Mon, 3 Oct 2016 16:00:48 +0000 (09:00 -0700)]
Merge "pipe: Fix recvmsg() error handling" into tizen

7 years agoMerge "pipe: Ensure pipe fd is opened in blocking mode" into tizen
Karol Lewandowski [Mon, 3 Oct 2016 15:59:53 +0000 (08:59 -0700)]
Merge "pipe: Ensure pipe fd is opened in blocking mode" into tizen

7 years agoMerge "pipe: Fix fd leaks during connect" into tizen
Karol Lewandowski [Mon, 3 Oct 2016 15:59:02 +0000 (08:59 -0700)]
Merge "pipe: Fix fd leaks during connect" into tizen

7 years agopipe: Fix recvmsg() error handling 67/90567/2
Karol Lewandowski [Fri, 30 Sep 2016 10:49:16 +0000 (12:49 +0200)]
pipe: Fix recvmsg() error handling

This fixes problem with recvmsg() error return code 0 being returned
as proper fd id (0, stdin).

Change-Id: Ia9be0b0b5d12ab202ea52c4153b749e1305a83c4

7 years agopipe: Ensure pipe fd is opened in blocking mode 87/90387/2
Karol Lewandowski [Thu, 29 Sep 2016 16:33:16 +0000 (18:33 +0200)]
pipe: Ensure pipe fd is opened in blocking mode

We need to either use blocking fd for write pipes or
handle EAGAIN errors explicitly.  First solution is
more effective.

(NOTE: Reader sockets should use non-blocking fds
 as readers - dlogutil - to not stall the daemon.)

Change-Id: I5a1043676bb963c7ecb722914d1933839d857093

7 years agopipe: Fix fd leaks during connect 86/90386/2
Karol Lewandowski [Thu, 29 Sep 2016 16:30:31 +0000 (18:30 +0200)]
pipe: Fix fd leaks during connect

Change-Id: Idfb4c68852456a6011194c7d0c9d23874bf202bf

7 years agoUse right variable 70/90270/1 accepted/tizen/3.0/ivi/20161011.043827 accepted/tizen/common/20160929.163550 accepted/tizen/ivi/20160929.233933 accepted/tizen/mobile/20160929.233922 accepted/tizen/tv/20160929.233929 accepted/tizen/wearable/20160929.233918 submit/tizen/20160929.083711 submit/tizen_3.0_ivi/20161010.000001
Kichan Kwon [Thu, 29 Sep 2016 08:15:58 +0000 (17:15 +0900)]
Use right variable

- Use unsigned char for storing only positive
- Only compare with not null string

Change-Id: I59b6ab8ef139d88969f6bbdf2905eec878b510ae
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRevert "Modify variable type" 69/90269/1
Kwon [Thu, 29 Sep 2016 08:11:51 +0000 (01:11 -0700)]
Revert "Modify variable type"

This reverts commit e793a48a6386c590dac6c541413603fa97835f45.

Change-Id: Ie2ae3e54a8aabbb0392c634678486fe23f571621

7 years agoModify variable type 20/90220/1
Kichan Kwon [Thu, 29 Sep 2016 05:25:04 +0000 (14:25 +0900)]
Modify variable type

Change-Id: I36969df3d8a51fc8fc2ca560f3acc21c8d69e4cc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRevert removed declaration 52/90052/2 accepted/tizen/common/20160929.163014 accepted/tizen/ivi/20160929.081438 accepted/tizen/mobile/20160929.081448 accepted/tizen/tv/20160929.081427 accepted/tizen/wearable/20160929.081422 submit/tizen/20160928.071137
Kichan Kwon [Wed, 28 Sep 2016 06:58:23 +0000 (15:58 +0900)]
Revert removed declaration

- In some environment, dlog-internal.h is excluded
- Therefore, dlog.h have not to rely on the declaration of dlog-internal.h

Change-Id: I4726bfe02b42ce389c37c15604a0d3371acafed4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoAdd dependency to each sub-packages 91/89391/1 accepted/tizen/common/20160923.161102 accepted/tizen/ivi/20160927.073608 accepted/tizen/mobile/20160927.072125 accepted/tizen/tv/20160927.072301 accepted/tizen/wearable/20160927.072619 submit/tizen/20160923.091716
Kichan Kwon [Fri, 23 Sep 2016 09:08:28 +0000 (18:08 +0900)]
Add dependency to each sub-packages

Change-Id: I86fd90e857bdd4804c74850bf5a6f1ed2757f69c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoVersion up 89/89089/1 submit/tizen/20160923.004117
Kichan Kwon [Thu, 22 Sep 2016 05:06:38 +0000 (14:06 +0900)]
Version up

Change-Id: I94f9a1fdd0df006216900efd4fcc337cad0c23c2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge "Fix a typo" into tizen
Kwon [Thu, 22 Sep 2016 05:00:16 +0000 (22:00 -0700)]
Merge "Fix a typo" into tizen

7 years agoMerge "KMSG handling more robust." into tizen
Kwon [Thu, 22 Sep 2016 05:00:10 +0000 (22:00 -0700)]
Merge "KMSG handling more robust." into tizen

7 years agoCleanup unused code 24/88024/5
Michal Bloch [Mon, 12 Sep 2016 09:12:38 +0000 (11:12 +0200)]
Cleanup unused code

Change-Id: Ie48b77b751be1f06b297ccecf89e73287a1e1488
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
[Rebase]
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agolibrary integration : build all backends at one time 88/87988/5
Kichan Kwon [Mon, 12 Sep 2016 07:42:40 +0000 (16:42 +0900)]
library integration : build all backends at one time

- Backend is selected by installing dlogbackend-BACKEND
- If any dlogbackend-BACKEND isn't installed, pipe backend is selected

Change-Id: I44a4bfc146de0a042c16bea2d6ede3a249075908
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agolibrary integration : remove backend dependent macro 07/87907/9
Kichan Kwon [Mon, 12 Sep 2016 05:54:54 +0000 (14:54 +0900)]
library integration : remove backend dependent macro

- To use dlog with all backends by building only one time, backend dependent macro should be removed
- Instead, we will find backend information in the conf file

Change-Id: Ie3d918deac3d3179a33a8c7d5a8e00360e271b5d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoFix minor issues 33/88833/3
Kichan Kwon [Wed, 21 Sep 2016 01:02:40 +0000 (10:02 +0900)]
Fix minor issues

- Use thread-safe function
- Guarantee inserting null character
- Don't write exceed value to char variable

Change-Id: I61a1e91f0bfbb70a77f06d8ab18e656c83fd2f74
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoFix a typo 28/89028/1
Michal Bloch [Wed, 21 Sep 2016 13:28:30 +0000 (15:28 +0200)]
Fix a typo

Prevents grep attempt ruination

Change-Id: I3e036d6d0820a8be56e2f07a804c50e7c18138ea
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoLogger : set right permission to socket and log files 06/88806/3 accepted/tizen/common/20160921.161316 accepted/tizen/ivi/20160922.042859 accepted/tizen/mobile/20160922.042806 accepted/tizen/tv/20160922.042823 accepted/tizen/wearable/20160922.042841 submit/tizen/20160920.154002
Karol Lewandowski [Tue, 20 Sep 2016 14:58:56 +0000 (16:58 +0200)]
Logger : set right permission to socket and log files

Change-Id: Ia5793ab0ce1e15da0d16c0685258f965a64e87a2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
[Split logger configuration & file parsing]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
[Bug fix]
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoSet debugmode by checking debugmode file 21/88421/2
Kichan Kwon [Mon, 19 Sep 2016 02:39:35 +0000 (11:39 +0900)]
Set debugmode by checking debugmode file

- If debugmode is enabled, fatal log can be written
- Else, process writing fatal log is aborted

Change-Id: I4c4928f9ff3041ba103908179c563a172f3a737f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoKMSG handling more robust. 43/88543/1
Michal Bloch [Fri, 16 Sep 2016 15:55:21 +0000 (17:55 +0200)]
KMSG handling more robust.

 * the parser handles malformed logs
 * util no longer discards parser result

Change-Id: I2e706b970b88717265f552703b0774a2e276519a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoFix KMSG EPIPE handling 73/88373/3
Michal Bloch [Fri, 16 Sep 2016 13:14:31 +0000 (15:14 +0200)]
Fix KMSG EPIPE handling

KMSG devices return EPIPE when the cyclic buffer rotates.

Change-Id: Idb27bccaee8bb14959e52fefaa70cf076c137bf8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoMerge "Update dlogutil help" into tizen
Kwon [Mon, 12 Sep 2016 07:54:16 +0000 (00:54 -0700)]
Merge "Update dlogutil help" into tizen

7 years agoUpdate dlogutil help 33/87933/1
Michal Bloch [Mon, 12 Sep 2016 07:31:16 +0000 (09:31 +0200)]
Update dlogutil help

Change-Id: I1ae4b52246b3f64fe88438c8262f25fcf15efa09
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoFix minor issues 88/87488/3 accepted/tizen/common/20160912.181604 accepted/tizen/ivi/20160913.041946 accepted/tizen/mobile/20160913.041855 accepted/tizen/tv/20160913.041911 accepted/tizen/wearable/20160913.041928 submit/tizen/20160912.082834
Kichan Kwon [Thu, 8 Sep 2016 07:27:07 +0000 (16:27 +0900)]
Fix minor issues

- Check too long path
- Close file at appropriate time

Change-Id: Ica9949b6d5ee678115c132d0e115cf93d24bb319
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoLogger packaging: dlogutil -> libdlog 34/85934/12
Michal Bloch [Mon, 29 Aug 2016 14:42:53 +0000 (16:42 +0200)]
Logger packaging: dlogutil -> libdlog

KMSG logging is a core feature and is provided by the daemon.

Change-Id: I437f7fb6a3f8745379709d91da44163c8794cd73
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRemove "_pipe" from universal files 33/85933/12
Michal Bloch [Mon, 29 Aug 2016 14:36:43 +0000 (16:36 +0200)]
Remove "_pipe" from universal files

Change-Id: Id331da1ec84c943e31e3d0106dbf14acc2473c1e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoFix passive log rotation for non-pipe backends 99/87599/3
Michal Bloch [Thu, 8 Sep 2016 18:00:30 +0000 (20:00 +0200)]
Fix passive log rotation for non-pipe backends

Change-Id: I6c816ffcce8067f467d409c770a3d8b8482d6821
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoUnify dlogutil 30/85930/13
Michal Bloch [Mon, 29 Aug 2016 12:57:04 +0000 (14:57 +0200)]
Unify dlogutil

Change-Id: I87511d0dd4567fd373eeb15e3233ca96bc29f5ff
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoReinstate udev rules 86/87386/5 accepted/tizen/common/20160909.114642 accepted/tizen/ivi/20160909.062106 accepted/tizen/mobile/20160909.062018 accepted/tizen/tv/20160909.062035 accepted/tizen/wearable/20160909.062048 submit/tizen/20160908.234540 submit/tizen_mobile/20160913.094622
Michal Bloch [Wed, 7 Sep 2016 18:31:07 +0000 (20:31 +0200)]
Reinstate udev rules

Change-Id: I17d1246afb00a08b83c9feae76fa888b22815dfa
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoCreate upgrade script (2.4 -> 3.0) 88/87288/3 accepted/tizen/common/20160908.134741 submit/tizen/20160908.075543
Kichan Kwon [Wed, 7 Sep 2016 08:22:30 +0000 (17:22 +0900)]
Create upgrade script (2.4 -> 3.0)

Change-Id: Id2653f462a208e9d7c7931f6faf55951d42b81c0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoPipe util accepts many -b parameters 10/84810/13 submit/tizen/20160902.061956
Michal Bloch [Thu, 25 Aug 2016 16:44:45 +0000 (18:44 +0200)]
Pipe util accepts many -b parameters

 - To explore multiple buffers
 - To seek out log messages
 - To boldly do what old util has already done before

Change-Id: Ic35c4284848eeeb2bde0d29ea66a7a52e82faa58
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoDocumentation. 37/85537/4 accepted/tizen/common/20160907.154334 accepted/tizen/ivi/20160908.003859 accepted/tizen/mobile/20160908.003754 accepted/tizen/tv/20160908.003811 accepted/tizen/wearable/20160908.003837 submit/tizen/20160907.035120
Michal Bloch [Tue, 23 Aug 2016 14:05:48 +0000 (16:05 +0200)]
Documentation.

Change-Id: Ifd945ead493a5999b837756a3fe62de599262ded
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoAll backends use new logger and handle /dev/kmsg 29/84629/10
Michal Bloch [Fri, 19 Aug 2016 10:50:31 +0000 (12:50 +0200)]
All backends use new logger and handle /dev/kmsg

 * old daemon did not support /dev/kmsg logging, the new one does.
   Now all backends (not only pipe) use this functionality.
 * makes maintenance easier as there are no longer two separate daemons.
   This simplifies both code and packaging.

Change-Id: I90cd3f22b2d055cbe0e92291ca8b1992133a0939
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoRefactor: KMSG now uses the same internal format 91/84591/11
Michal Bloch [Thu, 18 Aug 2016 13:45:47 +0000 (15:45 +0200)]
Refactor: KMSG now uses the same internal format

This massively simplifies code because there are no longer two
structures with differing layout but same name, which then allows
to unify a lot of duplicated functions which did the same thing
over different structures.

Change-Id: I585e6535ef15b53625d17fff581a41b434c558af
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoLogger: minor code fixes 99/86099/1
Michal Bloch [Tue, 30 Aug 2016 12:57:57 +0000 (14:57 +0200)]
Logger: minor code fixes

Change-Id: I48f29b1e935c0dacb82e60afb22fb1158bc21485
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoConfig: fix typos 29/85929/1
Michal Bloch [Mon, 29 Aug 2016 14:25:55 +0000 (16:25 +0200)]
Config: fix typos

Change-Id: I3ff436b7593b9c895925c48bd40a33352a5fcc94
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoFix a memleak 02/85302/2
Michal Bloch [Wed, 24 Aug 2016 12:46:02 +0000 (14:46 +0200)]
Fix a memleak

Change-Id: Idba70819901ebfe5ce9076bf5afd2965ce891bc6
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoPipe: fix typos in logger 12/84812/1
Michal Bloch [Mon, 22 Aug 2016 12:03:57 +0000 (14:03 +0200)]
Pipe: fix typos in logger

Change-Id: I57701b6cf5386fbda2f2c0ecc258cb76e250a635
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoRemove journal backend 47/84647/2
Kichan Kwon [Sat, 20 Aug 2016 07:55:27 +0000 (16:55 +0900)]
Remove journal backend

- It is substituted to pipe backend

Change-Id: Ica8025cfe5c0a4734782a1dad5a56f2efb2ba646
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoPipe devkmsg file: set standard format 25/84625/1
Michal Bloch [Fri, 19 Aug 2016 12:57:54 +0000 (14:57 +0200)]
Pipe devkmsg file: set standard format

Change-Id: I130235cd6ba78dce943d4f0c817415888e3b17c9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agodloginit: fix output config 23/84623/2
Michal Bloch [Fri, 19 Aug 2016 12:31:26 +0000 (14:31 +0200)]
dloginit: fix output config

dloginit is supposed to write the real sizes of created buffers
to the config, but it sometimes used to write nulls even on success.

Change-Id: I02d521e43b165bb83fe4e5106ab5244eb1b211d6
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoFix minor config issue 85/84585/1
Michal Bloch [Fri, 19 Aug 2016 10:13:23 +0000 (12:13 +0200)]
Fix minor config issue

Paths to all buffers need to be defined even if they are not used.

Change-Id: I8b6c34c14417eb41fb7dd4d47ea1e2282fb3a5f7
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoPipe: fix minor issues 74/84574/1
Michal Bloch [Fri, 19 Aug 2016 09:12:05 +0000 (11:12 +0200)]
Pipe: fix minor issues

 * use thread-safe functions
   (the daemon is single-threaded, this is mostly for code checking tools)
 * prevent mis-expressed starvation
 * fix a slight error in dlogutil format expectation
 * add a label for a conditionally compiled legacy block

Change-Id: Ic243bafe243194b95de27fa78a469e1fbb356d74
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoPipe: add /dev/kmsg support. 69/84269/5
Michal Bloch [Thu, 18 Aug 2016 19:44:17 +0000 (21:44 +0200)]
Pipe: add /dev/kmsg support.

 * add a -k parameter to dlog_logger configuration which enables /dev/kmsg reading.
 * the -b parameter accepts "kmsg" now.
 * the framework is easy to extend for the devices used by other backends
   (i.e. /dev/kmsg## and /dev/log_*) in the future.

Change-Id: I2d17bcbb0a6455320869c19f1f3885d6baa63fe1
Signed-off-by: Kazimierz Krosman <k.krosman@samsung.com>
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoPipe: Fix invalid rights 68/84268/2
Michal Bloch [Tue, 16 Aug 2016 16:21:07 +0000 (18:21 +0200)]
Pipe: Fix invalid rights

Change-Id: I81885a7cdf66f9cbab24469e2d78840666d723a9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoPipe: Fix rare flushing of seldomly used buffers 67/84267/2
Michal Bloch [Tue, 16 Aug 2016 16:20:26 +0000 (18:20 +0200)]
Pipe: Fix rare flushing of seldomly used buffers

For any given buffer, if all other buffers combined receive messages more often than the time threshold (-t parameter),
the remaining buffer will only flush when the data threshold (-b parameter) is met regardless of time.
Both conditions are supposed to trigger a flush.

Change-Id: I522d2f09e788f9eb731f9e5e1039dcc1a0e64aac
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoshared : remove timezone in the kerneltime format 74/82574/2
Kichan Kwon [Thu, 4 Aug 2016 08:17:41 +0000 (17:17 +0900)]
shared : remove timezone in the kerneltime format

Change-Id: I21bb01cf0ce46bc5dcbf066df5996d22c952134b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoSize tunning of dlog logger 14/83414/3 accepted/tizen/common/20160812.140754 accepted/tizen/ivi/20160812.010731 accepted/tizen/mobile/20160812.010740 accepted/tizen/tv/20160812.010727 accepted/tizen/wearable/20160812.010724 submit/tizen/20160811.065739
Kunhoon Baik [Wed, 10 Aug 2016 13:45:38 +0000 (22:45 +0900)]
Size tunning of dlog logger

At Tizen 2.3.1, dlog logger's size of each buffer was under 1M.
At Tizen 3.0, the dlog logger size may be shrinked to 2.3.1 after stablization completion.
(2.3.1 -> System : 512K, Radio : 256K, Main/App : 512K)

This is first trial of reducing log size at Tizen 3.0.

Change-Id: I019e8c650b27d7f97e57bf53f0e0a9f5537d7e5e

7 years agoHawkp is not used as Tizen reference board any more 00/82800/1
Kunhoon Baik [Sat, 6 Aug 2016 02:08:17 +0000 (11:08 +0900)]
Hawkp is not used as Tizen reference board any more

Change-Id: I125f48856c9e5681324929c6cee23ef3758f8be9

7 years agoSet default backend to pipe backend and remove switch about journal backend 53/82353/3 accepted/tizen/common/20160804.174358 accepted/tizen/ivi/20160804.081132 accepted/tizen/mobile/20160804.081203 accepted/tizen/tv/20160804.081048 accepted/tizen/wearable/20160804.081114 submit/tizen/20160803.081834
Kichan Kwon [Wed, 3 Aug 2016 05:05:31 +0000 (14:05 +0900)]
Set default backend to pipe backend and remove switch about journal backend

Change-Id: Ia0e900023999d036f5b7359b3c60bedb31e1ce41
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agodlogutil : set the default format of pipe backend with others 52/82352/1
Kichan Kwon [Wed, 3 Aug 2016 05:00:16 +0000 (14:00 +0900)]
dlogutil : set the default format of pipe backend with others

Change-Id: I80570fc030003074d47683316c3e9b272690cd40
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoKMSG: conform to the new format 93/80893/5 accepted/tizen/ivi/20160804.080943 accepted/tizen/mobile/20160804.080951 accepted/tizen/tv/20160804.080941 accepted/tizen/wearable/20160804.080919 submit/tizen/20160803.053117
Michal Bloch [Wed, 20 Jul 2016 13:50:43 +0000 (15:50 +0200)]
KMSG: conform to the new format

 - To use escape sequence at dlog, log format stored in the kernel buffer is modified
 - Notice : to apply this patch, you MUST use kernel with applied patch "kmsg: allow binary characters"

Change-Id: Ic73e6da895404a7b5bcf520bf13737f10bcfc939
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge "Apply Tizen Coding Rule" into tizen
Karol Lewandowski [Fri, 22 Jul 2016 12:56:02 +0000 (05:56 -0700)]
Merge "Apply Tizen Coding Rule" into tizen

7 years agoMerge "Pipe: safety against minor errors." into tizen
Karol Lewandowski [Fri, 22 Jul 2016 12:55:36 +0000 (05:55 -0700)]
Merge "Pipe: safety against minor errors." into tizen

7 years agoMerge "Pipe: util with --dumpfile exits on invalid file" into tizen
Karol Lewandowski [Fri, 22 Jul 2016 12:51:31 +0000 (05:51 -0700)]
Merge "Pipe: util with --dumpfile exits on invalid file" into tizen

7 years agoMerge "Pipe-backend: do not perform doomed writes" into tizen
Karol Lewandowski [Fri, 22 Jul 2016 12:48:04 +0000 (05:48 -0700)]
Merge "Pipe-backend: do not perform doomed writes" into tizen

7 years agoApply Tizen Coding Rule 64/81164/3
Michal Bloch [Thu, 21 Jul 2016 17:19:58 +0000 (19:19 +0200)]
Apply Tizen Coding Rule

Change-Id: I68ab663b9a6756db15204f0c68b788c2fecab540
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoPipe: safety against minor errors. 63/81163/3
Michal Bloch [Thu, 21 Jul 2016 16:29:38 +0000 (18:29 +0200)]
Pipe: safety against minor errors.

Change-Id: Ic273a498f9f292af2080c44a4ba481e53d9dac69
Signed-off-by: Michal Bloch <m.bloch@samsung.com>