diff options
author | Lutz Helwing <lutz_helwing@mentor.com> | 2015-07-13 16:52:14 +0200 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2015-07-21 12:48:27 +0200 |
commit | 98e932adee2a76bda3c2630f348196216549a45a (patch) | |
tree | 1658983ac5940b71c158da20421db9054f9500ca /src/system/dlt-system-journal.c | |
parent | 199ff0e7f736d848a7e01a12f04ddb21ecf36d74 (diff) | |
download | DLT-daemon-98e932adee2a76bda3c2630f348196216549a45a.tar.gz |
Removed all trailing whitespaces
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/system/dlt-system-journal.c')
-rw-r--r-- | src/system/dlt-system-journal.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/system/dlt-system-journal.c b/src/system/dlt-system-journal.c index 7cccb4b..03c785c 100644 --- a/src/system/dlt-system-journal.c +++ b/src/system/dlt-system-journal.c @@ -150,7 +150,7 @@ void journal_thread(void *v_conf) buffer_transport[DLT_SYSTEM_JOURNAL_BUFFER_SIZE]; int loglevel,systemd_loglevel; char* systemd_log_levels[] = { "Emergency","Alert","Critical","Error","Warning","Notice","Informational","Debug" }; - + DLT_LOG(dltsystem, DLT_LOG_DEBUG, DLT_STRING("dlt-system-journal, in thread.")); @@ -158,14 +158,14 @@ void journal_thread(void *v_conf) DLT_REGISTER_CONTEXT(journalContext, conf->Journal.ContextId, "Journal Adapter"); r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY/*SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_RUNTIME_ONLY*/); - printf("journal open return %d\n", r); + printf("journal open return %d\n", r); if (r < 0) { DLT_LOG(dltsystem, DLT_LOG_ERROR, DLT_STRING("dlt-system-journal, cannot open journal:"),DLT_STRING(strerror(-r))); printf("journal open failed: %s\n", strerror(-r)); return; } - + if(conf->Journal.CurrentBoot) { /* show only current boot entries */ @@ -176,7 +176,7 @@ void journal_thread(void *v_conf) DLT_STRING("dlt-system-journal failed to get boot id:"),DLT_STRING(strerror(-r))); sd_journal_close(j); return; - + } sd_id128_to_string(boot_id, match + 9); r = sd_journal_add_match(j,match,strlen(match)); @@ -186,9 +186,9 @@ void journal_thread(void *v_conf) DLT_STRING("dlt-system-journal failed to get match:"),DLT_STRING(strerror(-r))); sd_journal_close(j); return; - + } - } + } if(conf->Journal.Follow) { @@ -200,7 +200,7 @@ void journal_thread(void *v_conf) DLT_STRING("dlt-system-journal failed to seek to tail:"),DLT_STRING(strerror(-r))); sd_journal_close(j); return; - + } r = sd_journal_previous_skip(j, 10); if(r<0) @@ -209,13 +209,13 @@ void journal_thread(void *v_conf) DLT_STRING("dlt-system-journal failed to seek back 10 entries:"),DLT_STRING(strerror(-r))); sd_journal_close(j); return; - + } - + } - + while(!threads.shutdown) - { + { r = sd_journal_next(j); if(r<0) @@ -224,7 +224,7 @@ void journal_thread(void *v_conf) DLT_STRING("dlt-system-journal failed to get next entry:"),DLT_STRING(strerror(-r))); sd_journal_close(j); return; - + } else if(r>0) { @@ -236,7 +236,7 @@ void journal_thread(void *v_conf) DLT_STRING("dlt-system-journal failed to call sd_journal_get_realtime_usec(): "),DLT_STRING(strerror(-r))); sd_journal_close(j); return; - + } /* get data from journal entry, empty string if invalid fields */ @@ -287,12 +287,12 @@ void journal_thread(void *v_conf) loglevel = DLT_LOG_INFO; break; } - } + } if(systemd_loglevel>=0 && systemd_loglevel<=7) snprintf(buffer_priority,DLT_SYSTEM_JOURNAL_BUFFER_SIZE,"%s:",systemd_log_levels[systemd_loglevel]); else snprintf(buffer_priority,DLT_SYSTEM_JOURNAL_BUFFER_SIZE,"prio_unknown:"); - + /* write log entry */ DLT_LOG(journalContext, loglevel, DLT_STRING(buffer_time),DLT_STRING(buffer_process),DLT_STRING(buffer_priority),DLT_STRING(buffer_message)); @@ -300,17 +300,17 @@ void journal_thread(void *v_conf) } else { - r = sd_journal_wait(j,1000000); + r = sd_journal_wait(j,1000000); if(r<0) { DLT_LOG(dltsystem, DLT_LOG_ERROR, DLT_STRING("dlt-system-journal failed to call sd_journal_get_realtime_usec(): "),DLT_STRING(strerror(-r))); sd_journal_close(j); return; - + } } - + if(journal_checkUserBufferForFreeSpace()==-1) { // buffer is nearly full |