diff options
author | jk7744.park <jk7744.park@samsung.com> | 2015-10-24 17:03:29 +0900 |
---|---|---|
committer | jk7744.park <jk7744.park@samsung.com> | 2015-10-24 17:03:29 +0900 |
commit | 0521bbfeade0ec611aa4101cbfa1c242c51dc420 (patch) | |
tree | 49c0f3de97a530363ddc76d506fb3006e0657e1b /src | |
parent | 949280f9e145d767ec9f3861f5820b7ac1832be8 (diff) | |
download | dlog-0521bbfeade0ec611aa4101cbfa1c242c51dc420.tar.gz dlog-0521bbfeade0ec611aa4101cbfa1c242c51dc420.tar.bz2 dlog-0521bbfeade0ec611aa4101cbfa1c242c51dc420.zip |
tizen 2.4 releasetizen_2.4_mobile_releasesubmit/tizen_2.4/20151028.064614accepted/tizen/2.4/mobile/20151029.031936tizen_2.4accepted/tizen_2.4_mobile
Diffstat (limited to 'src')
-rwxr-xr-x | src/libdlog/log.c | 3 | ||||
-rw-r--r-- | src/libdlog/loglimiter.c | 1 | ||||
-rw-r--r-- | src/logger/logger.c | 2 | ||||
-rwxr-xr-x | src/logutil/logutil.c | 5 | ||||
-rwxr-xr-x | src/shared/logprint.c | 10 |
5 files changed, 14 insertions, 7 deletions
diff --git a/src/libdlog/log.c b/src/libdlog/log.c index 46fa2d1..7ac948b 100755 --- a/src/libdlog/log.c +++ b/src/libdlog/log.c @@ -27,7 +27,10 @@ #include <unistd.h> #include <stdio.h> #include <errno.h> + +#include <dlog-internal.h> #include <dlog.h> + #include "loglimiter.h" #include "logconfig.h" #ifdef HAVE_SYSTEMD_JOURNAL diff --git a/src/libdlog/loglimiter.c b/src/libdlog/loglimiter.c index a0e874e..644c7ac 100644 --- a/src/libdlog/loglimiter.c +++ b/src/libdlog/loglimiter.c @@ -31,6 +31,7 @@ #include <time.h> /* Included for priorities level */ +#include <dlog-internal.h> #include <dlog.h> #include "loglimiter.h" diff --git a/src/logger/logger.c b/src/logger/logger.c index 6b3a5cf..249dc60 100644 --- a/src/logger/logger.c +++ b/src/logger/logger.c @@ -45,7 +45,7 @@ #define COMMAND_MAX 5 #define DELIMITER " " -#define FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH) +#define FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) #define MAX_ARGS 16 #define MAX_ROTATED 4 #define MAX_QUEUED 4096 diff --git a/src/logutil/logutil.c b/src/logutil/logutil.c index ea96cfb..2fcd8ff 100755 --- a/src/logutil/logutil.c +++ b/src/logutil/logutil.c @@ -286,7 +286,6 @@ static void read_log_lines(struct log_device_t* devices) exit(EXIT_FAILURE); } - entry->entry.msg[entry->entry.len] = '\0'; enqueue(dev, entry); @@ -737,7 +736,7 @@ int main(int argc, char **argv) } } - if (getLogSize) { + if (getLogSize || g_nonblock) { int size, readable; size = get_log_size(dev->fd); @@ -751,7 +750,7 @@ int main(int argc, char **argv) perror("ioctl"); exit(EXIT_FAILURE); } - + g_log_rotate_size_kbytes += size / 1024; printf("%s: ring buffer is %dKb (%dKb consumed), " "max entry is %db, max payload is %db\n", dev->device, size / 1024, readable / 1024, diff --git a/src/shared/logprint.c b/src/shared/logprint.c index 6ab4d72..e58a661 100755 --- a/src/shared/logprint.c +++ b/src/shared/logprint.c @@ -287,14 +287,18 @@ int log_add_filter_rule(log_format *p_format, pri = DLOG_VERBOSE; } - char *tagName; + char *tagName = NULL; tagName = strndup(filterExpression, tagNameLength); + if (!tagName) { + goto error; + } FilterInfo *p_fi = filterinfo_new(tagName, pri); free(tagName); - if (!p_fi) - goto error; + if (!p_fi) { + goto error; + } p_fi->p_next = p_format->filters; p_format->filters = p_fi; } |