summaryrefslogtreecommitdiff
path: root/src/system/dlt-system-journal.c
Commit message (Collapse)AuthorAgeFilesLines
* dlt-system: Call tzset before localtime_r (#165)Saya Sugiura2019-09-231-0/+1
| | | | | | Since localtime() was calling tzset() internally, it should be used before localtime_r(). Refer to man page of localtime_r() for detail. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Bugfix: dlt-system-journalSebastian Kloska2019-09-131-5/+5
| | | | | | | * Don't pass a NULL pointer to localtime_r(...) and strftime(...) * Make sure that localtime_r(...) gets a pointer to time_t Signed-off-by: Sebastian Kloska <sebastian.kloska@daimler.com>
* Proper setup and error checking of pthread_createSebastian Kloska2019-09-131-12/+4
| | | | | | | | | | * Replace all start_XXX functions with one start_thread * Don't make pthread_t static * Don't use pthread_attr_t. Simply pass NULL * Bail out when pthread_create() fails * Check if MAX_THREADS gets exceeded Signed-off-by: Sebastian Kloska <sebastian.kloska@daimler.com>
* Add user custom timestamp interfaceSebastian Unger2019-09-131-7/+21
| | | | | | | | | | | | | Two new macros are introduced so that users can use their customized timestamps for DLT messages: - DLT_LOG_TS(CONTEXT, LOGLEVEL, TS, ARGS ...) - DLT_LOG_ID_TS(CONTEXT, LOGLEVEL, MSGID, TS, ARGS ...) Detailed explanations can be found in dlt_for_developers.md. Also a new option is added to dlt-system to use events' timestamps from journald adapter. Signed-off-by: Sebastian Unger <sunger@de.adit-jv.com>
* dlt-system-journal: fixed localtime compile errorjiripopek2019-07-251-1/+1
| | | | | | | fixes compiler error "error: too many arguments to function ‘localtime’" Signed-off-by: jiripopek <Jiri.Popek@bmw.de>
* doxygen: Remove licenceSaya Sugiura2019-07-191-2/+0
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fix alerts from lgtmSaya Sugiura2019-06-191-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fix compiler warningsSimon Herkenhoff2019-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compiler warnings about socket usage Correct the data types used for the socket declaration. We use AF_UNIX sockets so we use struct sockaddr_un, but we need to cast to struct sockaddr for the socket API. Fix compiler warnings about sign-compare Fix two occurences of signed - unsigned comparison by casting the values accordingly. Note that the cast is legal as the first parts of both conditional statements make sure the value is not negative before casting to unsigned. While at it, add strtol error checking. Fix compiler warnings about string functions Add string.h to src/daemon/dlt_daemon_unix_socket.c, because it was unaware of memcpy and strerror. While at it, change unsafe use of sprintf to proper dlt_vlog and remove the char buffer. Fix compiler warnings about unused-* Fix two unused-variable and one unused-parameter warning. While at it, change the #ifdef to not run into an empty block. Simply reverse the condition and enclose the complete else with the #ifdef. POSIX: Use memset instead of bzero "The bzero() function is deprecated (marked as LEGACY in POSIX.1-2001); use memset(3) in new programs." Use memset instead of bzero and remove any occurrence from DLT. Include of header "strings.h" that has bzero is also removed. Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Code beautification using uncrustifyChristoph Lipka2018-12-211-296/+290
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Set default log-levels in dlt.confStefan Vacek2015-12-091-1/+1
| | | | | | | | - feature: allow to define a default-log-level in dlt.conf (see dlt.conf for documentation) - bugfix: make dlt_unlock_mutex not inline to fix linkage - bugfix: initial log-level was not set correctly when no dlt-daemon was running Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Fix register context before application is registeredStefan Vacek2015-12-081-2/+2
| | | | | | | | Additional: - include sd-daemon.h if watchdog is enabled - fix formatting for printf 64bit values Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Fixed compiler warnings about format issues in dlt-system-journal.c by ↵Lutz Helwing2015-12-071-2/+2
| | | | replacing llu with PRIu64
* Use the best possible timestamp for all system journal entries: Realtime: ↵Lutz Helwing2015-10-071-26/+88
| | | | | | use _SOURCE_REALTIME_TIMESTAMP if available, else fall back to __REALTIME_TIMESTAMP which is always present Monotonic time: use _SOURCE_MONOTONIC_TIMESTAMP if available, else fall back to __MONOTONIC_TIMESTAMP which is always present Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Removed all trailing whitespacesLutz Helwing2015-07-211-18/+18
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed license headers and copyright doxygen commentsLutz Helwing2015-06-171-2/+2
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated license headers to latest GENIVI license policy. Fixed further LRT ↵Lutz Helwing2015-06-171-11/+15
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-011-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: Bug 172 - DLT system crashes because of wrong journald adaptor ↵Alexander Wenzel2014-04-011-52/+58
| | | | | | implementation Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix: Systemd Journal Adapter provides corrupted output.Alexander Wenzel2013-10-241-0/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Changes after review of journal implementation.Alexander Wenzel2013-07-251-13/+39
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Beautify output of journal logging.Alexander Wenzel2013-07-251-24/+88
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added options for journal logging.Alexander Wenzel2013-07-251-23/+98
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* First version of journal support.Alexander Wenzel2013-07-251-0/+166
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>