summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--include/ico_log.h6
-rw-r--r--packaging/ico-uxf-utilities.changes6
-rw-r--r--packaging/ico-uxf-utilities.spec4
-rw-r--r--src/Makefile.am2
-rw-r--r--src/ico_log.c16
6 files changed, 24 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 9b49afe..398b36c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ([2.68])
AC_INIT([ico-uxf-utilities],
- [0.2.03],
+ [0.9.01],
[https://BUG-REPORT-ADDRESS])
AC_CONFIG_HEADERS([config.h])
diff --git a/include/ico_log.h b/include/ico_log.h
index 3b5e224..e059da4 100644
--- a/include/ico_log.h
+++ b/include/ico_log.h
@@ -7,13 +7,13 @@
*
*/
-/*========================================================================*/
+/*========================================================================*/
/**
* @file ico_log.h
*
* @brief debug log function
*/
-/*========================================================================*/
+/*========================================================================*/
#ifndef __ICO_LOG_H__
#define __ICO_LOG_H__
@@ -30,7 +30,7 @@ extern "C" {
/**!< Directory name of Log destination */
/* Maximum lines/files */
-#define ICO_LOG_MAXLINES 10000
+#define ICO_LOG_MAXLINES 20000
/**!< Maximum output lines of log file */
#define ICO_LOG_MAXFILES 6
/**!< Maximum number of the log file */
diff --git a/packaging/ico-uxf-utilities.changes b/packaging/ico-uxf-utilities.changes
index f4cc13c..7628d95 100644
--- a/packaging/ico-uxf-utilities.changes
+++ b/packaging/ico-uxf-utilities.changes
@@ -1,3 +1,9 @@
+* Tue Oct 08 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20130919.204322@558ccea
+- 0.9.01 release
+-- change version number from 0.2.x to 0.9.x
+-- Fix for TIVI-1940 - /var/log/ico directory doesn't create when creating snapshot image
+-- fox for - The largest-capacity limit of the log file does not work.
+
* Thu Sep 19 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20130911.005417@250001b
- 0.2.04 release.
-- Addition of the log output function that application is available.
diff --git a/packaging/ico-uxf-utilities.spec b/packaging/ico-uxf-utilities.spec
index faaaf4f..4cb3f45 100644
--- a/packaging/ico-uxf-utilities.spec
+++ b/packaging/ico-uxf-utilities.spec
@@ -1,6 +1,6 @@
Name: ico-uxf-utilities
Summary: Common utilities for ico uifw
-Version: 0.2.04
+Version: 0.9.01
Release: 1.1
Group: Automotive/Libraries
License: Apache-2.0
@@ -10,6 +10,8 @@ Source0: %{name}-%{version}.tar.bz2
BuildRequires: pkgconfig(libwebsockets) >= 1.2
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
+Requires: /usr/bin/mkdir
+Requires: /usr/bin/chmod
%description
common utilities for ico uifw.
diff --git a/src/Makefile.am b/src/Makefile.am
index 1d43c61..91e097e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,7 @@ lib_LTLIBRARIES = libico-util.la
libico_util_la_CFLAGS = -I../include $(OPT_CFLAGS)
libico_util_la_LIBADD = $(OPT_LIBS) -lwebsockets
-libico_util_la_LDFLAGS = -version-info 0:2:0
+libico_util_la_LDFLAGS = -version-info 0:9:0
libico_util_la_SOURCES = \
ico_uws.c \
ico_log.c
diff --git a/src/ico_log.c b/src/ico_log.c
index 0ec65c0..3b8bf2c 100644
--- a/src/ico_log.c
+++ b/src/ico_log.c
@@ -11,7 +11,7 @@
/**
* @file ico_log.c
*
- * @brief
+ * @brief
*/
/*------------------------------------------------------------------------*/
@@ -43,13 +43,14 @@
static int time_zone = 99*60*60; /*!< local time difference(sec) */
static int log_level = 0x7FFFFFFF; /*!< output level debug log */
-static bool flush_mode = true; /*!< flush mode flag */
+static bool flush_mode = true; /*!< flush mode flag */
static bool initialized = false; /*!< initialized flag */
static FILE *log_fd = NULL; /*!< file descriptor of output debug log*/
+static int log_stdout = 0; /*!< flag for log output to stdout */
static int log_lines = 0; /*!< output lines */
static char log_prog[32] = {0,}; /*!< name of output source module */
-
+
/*------------------------------------------------------------------------*/
/**
* @brief printout log message
@@ -89,7 +90,7 @@ ico_log_print(int level, const char *fmt, ...)
fflush(log_fd);
}
}
- if (log_fd != stdout) {
+ if (log_stdout == 0) {
log_lines ++;
}
}
@@ -112,7 +113,7 @@ ico_log_open(const char *prog)
if (NULL != log_fd) {
fflush(log_fd);
- if (log_fd != stdout) {
+ if (log_stdout == 0) {
fclose(log_fd);
}
}
@@ -120,6 +121,7 @@ ico_log_open(const char *prog)
log_lines = 0;
if ((! prog) || (*prog == 0)) {
+ log_stdout = 1;
log_fd = stdout;
log_prog[0] = 0;
return;
@@ -129,6 +131,7 @@ ico_log_open(const char *prog)
log_prog[sizeof(log_prog)-1] = 0;
}
#if ICO_LOG_STDOUT > 0
+ log_stdout = 1;
log_fd = stdout;
#else /*ICO_LOG_STDOUT*/
snprintf(sPath, sizeof(sPath)-1, "%s/%s.log%d",
@@ -150,6 +153,7 @@ ico_log_open(const char *prog)
log_fd = fopen(sPath, "w");
if (NULL == log_fd) {
+ log_stdout = 1;
log_fd = stdout;
}
else if ((initialized == false) &&
@@ -174,7 +178,7 @@ ico_log_close(void)
#if ICO_LOG_STDOUT == 0
if (NULL != log_fd) {
fflush(log_fd);
- if (log_fd != stdout) {
+ if (log_stdout == 0) {
fclose(log_fd);
}
log_fd = (FILE *)NULL;