--- /dev/null
+juho son <juho80.son at samsung dot com>
+Suchang Woo <suchang.woo at samsung dot com>
+kyungmin Park <kyungmin Park at samsung dot com>
--- /dev/null
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+
--- /dev/null
+
+
+if SD_JOURNAL_SUPPORT
+AM_CFLAGS = @CFLAGS@ -I$(srcdir)/include \
+ -I$(srcdir)/include/internal -DSD_JOURNAL_SUPPORT
+else
+AM_CFLAGS = @CFLAGS@ -I$(srcdir)/include \
+ -I$(srcdir)/include/internal
+endif
+
+dlog_includedir = $(includedir)/dlog
+dlog_include_HEADERS = \
+ include/dlog.h
+
+lib_LTLIBRARIES = libdlog.la
+
+libdlog_la_SOURCES = \
+ log.c \
+ include/dlog.h
+
+if SD_JOURNAL_SUPPORT
+libdlog_la_LIBADD = -lpthread -lsystemd-journal
+else
+libdlog_la_LIBADD = -lpthread
+endif
+bin_PROGRAMS= dlogutil
+
+dlogutil_SOURCES = \
+ logutil.c \
+ logprint.c \
+ include/logger.h \
+ include/logprint.h
+
+# conf file
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = dlog.pc
+
+bootscriptdir = /etc/rc.d/init.d
+bootscript_SCRIPTS = dlog.sh
+
+
--- /dev/null
+Copyright (c) The Android Open Source Project
+Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
--- /dev/null
+# Customize below path information
+TET_INSTALL_PATH=/scratchbox/TETware
+
+TET_SIMUL_PATH=$TET_INSTALL_PATH/tetware-simulator
+TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+TET_MOUNTED_PATH=/mnt/nfs/TETware/tetware-target
+
+MACHINE=`echo $SBOX_UNAME_MACHINE`
+
+if [ $MACHINE = "i686" ] # Scratchbox i686
+then
+ export ARCH=simulator
+ export TET_ROOT=$TET_SIMUL_PATH
+elif [ $MACHINE = "arm" ] # Scratchbox ARM
+then
+ export ARCH=target
+ export TET_ROOT=$TET_TARGET_PATH
+else
+ export ARCH=target
+ export TET_ROOT=$TET_MOUNTED_PATH
+fi
+
+export PATH=$TET_ROOT/bin:$PATH
+export LD_LIBRARY_PATH=$TET_ROOT/lib/tet3:$LD_LIBRARY_PATH
+
+set $(pwd)
+export TET_SUITE_ROOT=$1
+
+set $(date +%y%m%d_%H%M%S)
+FILE_NAME_EXTENSION=$1
--- /dev/null
+#!/bin/sh
+
+export TET_INSTALL_PATH=/home/jeesun1981/TETware # local tetware path
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+export TET_ROOT=$TET_TARGET_PATH
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -c -p ./
+tcc -b -j $JOURNAL_RESULT -p ./
+grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
--- /dev/null
+#!/bin/sh
+export TET_INSTALL_PATH=/mnt/nfs/tetware
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+
+export TET_ROOT=$TET_TARGET_PATH
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -e -j $JOURNAL_RESULT -p ./
+grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
--- /dev/null
+0|3.7-lite 06:32:25 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 06:32:25|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 06:32:26|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 06:32:26|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 06:32:27|Clean End, scenario ref 2-0
+900|06:32:27|TCC End
--- /dev/null
+0|3.7-lite 06:33:56 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 06:33:56|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 06:33:57|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 06:33:57|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 06:33:58|Clean End, scenario ref 2-0
+900|06:33:58|TCC End
--- /dev/null
+0|3.7-lite 07:10:21 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 07:10:21|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 07:10:22|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 07:10:22|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 07:10:23|Clean End, scenario ref 2-0
+900|07:10:23|TCC End
--- /dev/null
+0|3.7-lite 08:33:25 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 08:33:25|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 08:33:26|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:33:26|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 08:33:27|Clean End, scenario ref 2-0
+900|08:33:27|TCC End
--- /dev/null
+0|3.7-lite 08:44:58 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 08:44:58|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 08:44:59|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:44:59|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 08:45:00|Clean End, scenario ref 2-0
+900|08:45:00|TCC End
--- /dev/null
+0|3.7-lite 08:46:09 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 08:46:09|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 08:46:10|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:46:10|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 08:46:11|Clean End, scenario ref 2-0
+900|08:46:11|TCC End
--- /dev/null
+0|3.7-lite 08:46:35 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 08:46:35|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 08:46:36|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:46:36|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 08:46:37|Clean End, scenario ref 2-0
+900|08:46:37|TCC End
--- /dev/null
+0|3.7-lite 08:49:56 20110816|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 08:49:56|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 08:49:57|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:49:57|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 08:49:58|Clean End, scenario ref 2-0
+900|08:49:58|TCC End
--- /dev/null
+0|3.7-lite 01:12:37 20110817|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 01:12:37|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 01:12:38|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 01:12:38|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 01:12:39|Clean End, scenario ref 2-0
+900|01:12:39|TCC End
--- /dev/null
+0|3.7-lite 01:13:46 20110817|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 01:13:46|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 01:13:47|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 01:13:47|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 01:13:48|Clean End, scenario ref 2-0
+900|01:13:48|TCC End
--- /dev/null
+0|3.7-lite 10:56:52 20110919|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-11-generic #49-Ubuntu SMP Mon Aug 29 20:47:58 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 10:56:52|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 10:56:53|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 10:56:53|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 10:56:54|Clean End, scenario ref 2-0
+900|10:56:54|TCC End
--- /dev/null
+0|3.7-lite 11:18:21 20110919|User: root (0) TCC Start, Command line: tcc -c -p ./
+5|Linux jeesun1981-desktop 2.6.38-11-generic #49-Ubuntu SMP Mon Aug 29 20:47:58 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetclean.cfg 2|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_CLEAN_TOOL=make clean
+30||TET_API_COMPLIANT=True
+30||TET_PASS_TC_NAME=False
+30||TET_VERSION=3.7-lite
+40||Config End
+300|0 /unit/utc_ApplicationFW___dlog_print_func 11:18:21|Clean Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|0 0 11:18:22|Clean End, scenario ref 1-0
+300|1 /unit/utc_ApplicationFW___dlog_vprint_func 11:18:22|Clean Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+320|1 0 11:18:23|Clean End, scenario ref 2-0
+900|11:18:23|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">06:32:27</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 06:32:27 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313476345.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 06:32:27|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 06:32:28|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 06:32:28|Build Start, scenario ref 2-0
+130|1 2 06:32:29|Build End, scenario ref 2-0
+900|06:32:29|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">06:33:58</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 06:33:58 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313476436.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 06:33:58|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 06:33:59|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 06:33:59|Build Start, scenario ref 2-0
+130|1 2 06:34:00|Build End, scenario ref 2-0
+900|06:34:00|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">07:10:23</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 07:10:23 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313478621.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 07:10:23|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 07:10:24|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 07:10:24|Build Start, scenario ref 2-0
+130|1 2 07:10:25|Build End, scenario ref 2-0
+900|07:10:25|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">08:33:27</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 08:33:27 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313483605.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 08:33:27|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 08:33:28|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:33:28|Build Start, scenario ref 2-0
+130|1 2 08:33:29|Build End, scenario ref 2-0
+900|08:33:29|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">08:45:00</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 08:45:00 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313484298.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 08:45:00|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 08:45:01|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:45:01|Build Start, scenario ref 2-0
+130|1 2 08:45:02|Build End, scenario ref 2-0
+900|08:45:02|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">08:46:11</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 08:46:11 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313484369.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 08:46:11|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 08:46:12|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:46:12|Build Start, scenario ref 2-0
+130|1 2 08:46:13|Build End, scenario ref 2-0
+900|08:46:13|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">08:46:37</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 08:46:37 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313484395.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 08:46:37|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 08:46:38|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:46:38|Build Start, scenario ref 2-0
+130|1 2 08:46:39|Build End, scenario ref 2-0
+900|08:46:39|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-16</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">08:49:58</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">2</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">0</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 08:49:58 20110816|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313484596.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 08:49:58|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 08:49:59|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 08:49:59|Build Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|1 0 08:50:00|Build End, scenario ref 2-0
+900|08:50:00|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-17</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">01:12:39</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">1</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 01:12:39 20110817|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313543556.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 01:12:39|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 01:12:42|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 01:12:42|Build Start, scenario ref 2-0
+130|1 2 01:12:43|Build End, scenario ref 2-0
+900|01:12:43|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-08-17</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">01:13:48</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">2</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">0</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 01:13:48 20110817|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1313543625.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 01:13:48|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 01:13:49|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 01:13:49|Build Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|1 0 01:13:50|Build End, scenario ref 2-0
+900|01:13:50|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-11-generic #49-Ubuntu SMP Mon Aug 29 20:47:58 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-09-19</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">10:56:54</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">2</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">0</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 10:56:54 20110919|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1316429812.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-11-generic #49-Ubuntu SMP Mon Aug 29 20:47:58 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 10:56:54|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 10:56:55|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 10:56:55|Build Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|1 0 10:56:56|Build End, scenario ref 2-0
+900|10:56:56|TCC End
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<title>TETware Test Run Report</title>
+</head>
+<body bgcolor="white">
+<p><table border="1" width="100%" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading1"><center><h1>
+TETware Test Run Report</h1></center></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder">TETware version:</td>
+<td align="left" class="noborder">3.7-lite</td>
+</tr>
+<tr>
+<td align="left" class="noborder">System Information:</td>
+<td align="left" class="noborder">Linux jeesun1981-desktop 2.6.38-11-generic #49-Ubuntu SMP Mon Aug 29 20:47:58 UTC 2011 armv7l</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Date of test run:</td>
+<td align="left" class="noborder">2011-09-19</td>
+</tr>
+<tr>
+<td align="left" class="noborder">Start time:</td>
+<td align="left" class="noborder">11:18:23</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Count</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+<td align="right" bgcolor="#33cc33" class="success">2</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#ff5555" class="failure">Failure</td>
+<td align="right" bgcolor="#ff5555" class="failure">0</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#cccccc" class="neutral"><b>Total</b></td>
+<td align="right" bgcolor="#cccccc" class="neutral"><b>2</b></td>
+</tr>
+</table></p>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode summary</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Build mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="5" cellspacing="4">
+<tr>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Testcase</b></td>
+<td align="center" bgcolor="#cccccc" class="neutral"><b>Result</b></td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_print_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+<tr>
+<td align="left" bgcolor="#33cc33" class="success">/unit/utc_ApplicationFW___dlog_vprint_func</td>
+<td align="left" bgcolor="#33cc33" class="success">Success</td>
+</tr>
+</table></p>
+
+<hr>
+<p><table border="1" cellpadding="3" cellspacing="0">
+<tr><td bgcolor="#ccccff" class="heading2"><font size="+2"><b>
+Execute mode result breakdown</b></font></td></tr></table></p>
+<p><table border="0" cellpadding="2" cellspacing="1">
+<tr>
+<td align="left" class="noborder"><i>No results</i></td>
+</tr>
+</table></p>
+
+<hr>
+</body>
+</html>
--- /dev/null
+0|3.7-lite 11:18:23 20110919|User: root (0) TCC Start, Command line: tcc -b -j results/build-tar-result-1316431101.journal -p ./
+5|Linux jeesun1981-desktop 2.6.38-11-generic #49-Ubuntu SMP Mon Aug 29 20:47:58 UTC 2011 armv7l|System Information
+20|/home/jeesun1981/sbs110323/repo110323/dlog/TC/./tetbuild.cfg 0|Config Start
+30||TET_OUTPUT_CAPTURE=False
+30||TET_BUILD_TOOL=make
+30||TET_PASS_TC_NAME=True
+30||TET_API_COMPLIANT=True
+30||TET_VERSION=3.7-lite
+40||Config End
+110|0 /unit/utc_ApplicationFW___dlog_print_func 11:18:23|Build Start, scenario ref 1-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|0 0 11:18:24|Build End, scenario ref 1-0
+110|1 /unit/utc_ApplicationFW___dlog_vprint_func 11:18:24|Build Start, scenario ref 2-0
+50||(jnlproc.c, 206): can't open /home/jeesun1981/sbs110323/repo110323/dlog/TC/./unit/tet_xres: No such file or directory
+130|1 0 11:18:25|Build End, scenario ref 2-0
+900|11:18:25|TCC End
--- /dev/null
+# TET reserved codes
+0 "PASS"
+1 "FAIL"
+2 "UNRESOLVED"
+3 "NOTINUSE"
+4 "UNSUPPORTED"
+5 "UNTESTED"
+6 "UNINITIATED"
+7 "NORESULT"
+
+# Test suite additional codes
+33 "INSPECT"
--- /dev/null
+all
+ ^TEST
+##### Scenarios for TEST #####
+
+# Test scenario
+TEST
+ :include:/unit/tslist
--- /dev/null
+TET_OUTPUT_CAPTURE=False
+TET_BUILD_TOOL=make
+TET_PASS_TC_NAME=True
--- /dev/null
+TET_OUTPUT_CAPTURE=False
+TET_CLEAN_TOOL=make clean
--- /dev/null
+TET_OUTPUT_CAPTURE=False
--- /dev/null
+CC ?= gcc
+
+TARGETS = utc_ApplicationFW___dlog_print_func \
+ utc_ApplicationFW___dlog_vprint_func
+
+PKGS = dlog
+
+LDFLAGS = `pkg-config --libs $(PKGS)`
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+all: $(TARGETS)
+
+$(TARGETS): %: %.c
+ $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+ rm -f $(TARGETS)
--- /dev/null
+/unit/utc_ApplicationFW___dlog_print_func
+/unit/utc_ApplicationFW___dlog_vprint_func
--- /dev/null
+#include <tet_api.h>
+#include "dlog.h"
+#define LOG_BUF_SIZE 1024
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW___dlog_print_func_01(void);
+static void utc_ApplicationFW___dlog_print_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_ApplicationFW___dlog_print_func_01, POSITIVE_TC_IDX },
+ { utc_ApplicationFW___dlog_print_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+//static int pid;
+
+static void startup(void)
+{
+}
+
+static void cleanup(void)
+{
+}
+
+/**
+ * @brief Positive test case of __dlog_print()
+ */
+static void utc_ApplicationFW___dlog_print_func_01(void)
+{
+ int r = 0;
+
+ r = __dlog_print(LOG_ID_MAIN, DLOG_DEBUG,"DLOG_TEST", "dlog test message for tetware\n");
+
+ if (r<0) {
+ tet_printf("__dlog_print() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init __dlog_print()
+ */
+static void utc_ApplicationFW___dlog_print_func_02(void)
+{
+ int r = 0;
+
+ r = __dlog_print( LOG_ID_MAX , DLOG_DEBUG,"DLOG_TEST", "dlog test message for tetware\n");
+
+ if (r>=0) {
+ tet_printf("__dlog_print() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
+}
--- /dev/null
+#include <stdarg.h>
+#include <tet_api.h>
+#include "dlog.h"
+#define LOG_BUF_SIZE 1024
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW___dlog_vprint_func_01(void);
+static void utc_ApplicationFW___dlog_vprint_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_ApplicationFW___dlog_vprint_func_01, POSITIVE_TC_IDX },
+ { utc_ApplicationFW___dlog_vprint_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static int pid;
+char *fmt = "dlog test message for tetware\n";
+
+static void startup(void)
+{
+}
+
+static void cleanup(void)
+{
+}
+/**
+ * @brief Positive test case of __dlog_vprint()
+ */
+void utc_ApplicationFW___dlog_vprint_func_01(void)
+{
+ int r = 0;
+ char buf[LOG_BUF_SIZE];
+ va_list ap;
+
+ /* va_start(ap, fmt);*/
+
+ r = __dlog_vprint(LOG_ID_MAIN, DLOG_DEBUG, "DLOG_TEST", buf, ap );
+ /* va_end(ap);*/
+
+ if (r<0) {
+ tet_printf("__dlog_vprint() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init __dlog_vprint()
+ */
+void utc_ApplicationFW___dlog_vprint_func_02(void)
+{
+ int r = 0;
+ char buf[LOG_BUF_SIZE];
+ va_list ap;
+// va_start(ap, fmt);
+
+ r = __dlog_vprint(LOG_ID_MAX, DLOG_DEBUG,"DLOG_TEST", fmt, ap );
+// va_end(ap);
+
+ if (r>=0) {
+ tet_printf("__dlog_vprint() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
+}
--- /dev/null
+aclocal
+libtoolize --copy
+autoheader
+autoconf
+automake --add-missing --copy --foreign
+
--- /dev/null
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT([dlog], [1.0], yk.yun@samsung.com)
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AC_CONFIG_HEADERS([config.h:config.hin])
+
+AC_CONFIG_MACRO_DIR([m4])
+# Init XO
+PLATFORM_INIT
+
+# Checks for programs.
+dnl AC_PROG_CXX
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+AC_PROG_CC
+AC_PROG_GCC_TRADITIONAL
+AC_PROG_LIBTOOL
+
+# checks arch
+AM_CONDITIONAL(DEVELOP_VER, test $DEVELOP_VER = yes)
+
+SD_JOURNAL_SUPPORT=no
+
+#AC_DEFINE([SD_JOURNAL_SUPPORT], [], [Description])
+
+AM_CONDITIONAL(SD_JOURNAL_SUPPORT, test $SD_JOURNAL_SUPPORT = yes)
+
+#AM_CONDITIONAL([ARCH_IS_ARM], [test "x$ARCH" = "xarm"])
+if test "x$ARCH" = "xarm" ; then
+ DLOG_CFLAGS="-D__arm__"
+else
+ DLOG_CFLAGS=
+fi
+
+AC_SUBST(DLOG_CFLAGS)
+
+
+dnl AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
+# Checks for libraries.
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([stdlib.h unistd.h ])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_STRUCT_TM
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_STAT
+AC_CHECK_FUNCS([memset])
+
+# output files
+AC_CONFIG_FILES([Makefile dlog.pc])
+AC_OUTPUT
--- /dev/null
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: dlog
+Description: logging service
+Version: 1.0
+Requires:
+Libs: -L${libdir} -ldlog -lpthread
+Cflags: -I${includedir}/dlog
--- /dev/null
+#!/bin/sh
+/usr/bin/dlogutil -r 5120 -n 1 -f /var/log/dlog -v threadtime *:W &
--- /dev/null
+#!/bin/sh
+MODE=none
+OBJ=none
+VAL=none
+#echo "tizen_platform_dlog_logging_ctrl"
+case "$1" in
+get)
+ MODE=get
+;;
+set)
+ MODE=set
+;;
+
+*)
+echo "Usage: dlogctrl {get|set} {platformlog} {1|0}"
+exit 1
+esac
+
+case "$2" in
+platformlog)
+ OBJ=platformlog
+;;
+*)
+ echo "Usage: dlogctrl {get|set} {platformlog} {1|0}"
+exit 1
+esac
+
+if [ "$MODE" = "set" ]; then
+ case "$3" in
+ 1)
+ VAL=1
+ ;;
+ 0)
+ VAL=0
+ ;;
+ *)
+ echo "Usage: dlogctrl {get|set} {platformlog} {1|0}"
+ exit 1
+ esac
+fi
+
+if [ "$MODE" = "set" ]; then
+ if [ "$OBJ" = "platformlog" ] && [ "$VAL" = "1" ] ; then
+ touch /opt/etc/dlog/.platformloggingmode 2>/dev/null
+ elif [ "$OBJ" = "platformlog" ] && [ "$VAL" = "0" ] ; then
+ rm -f /opt/etc/dlog/.platformloggingmode 2>/dev/null
+ fi
+else
+ if [ "$OBJ" = "platformlog" ]; then
+ if [ -e "/opt/etc/dlog/.platformloggingmode" ]; then
+ echo 1
+ else
+ echo 0
+ fi
+ fi
+ echo "You must reboot this target to apply the change!"
+fi
+
+exit 0
--- /dev/null
+<manifest>
+ <define>
+ <domain name="dlogutil"/>
+ <provide>
+ <label name="dlogutil::dlogutil"/>
+ <label name="dlogutil::dlogctrl"/>
+ <label name="dlogutil::dlog"/>
+ </provide>
+ </define>
+ <request>
+ <domain name="dlogutil"/>
+ </request>
+ <assign>
+ <filesystem path="/usr/bin/dlogutil" label="dlogutil::dlogutil"/>
+ <filesystem path="/usr/bin/dlogctrl" label="dlogutil::dlogctrl"/>
+ <filesystem path="/opt/etc/dlog" label="dlogutil::dlog"/>
+ <filesystem path="/etc/rc.d/init.d/dlog.sh" label="_" exec_label="none"/>
+ <filesystem path="/etc/rc.d/rc3.d/S05dlog" label="_" exec_label="none"/>
+ </assign>
+</manifest>
--- /dev/null
+/**
+ @ingroup SLP_PG
+ @defgroup SLP_PG_Dlog dlog
+ @{
+
+<h1 class="pg">Introduction</h1>
+Dlog logging service support sending log message to circular log device
+
+<h1 class="pg">dlog Architecture</h1>
+@image html SLP_Dlog_PG_image001.png System Architecture of dlog
+
+<h1 class="pg">dlog properties</h1>
+Sending log message to circular buffer. dlog APIs include Priority and Tag. By using priority and Tag, we can easily filtered messages what we want to see.
+ <h2 class="pg">priority</h2>
+priority level incdicates the urgency of log message
+
+<table>
+<tr>
+ <th>Priority</th>
+ <th>Description</th>
+</tr>
+<tr>
+ <td>VERBOSE </td>
+ <td>Verbose message. - compiled into application and logged at runtime only when debug mode. on release mode, this log message is strip.</td>
+</tr>
+<tr>
+ <td>DEBUG</td>
+ <td>Debug messasge. - always compiled into application, but not logged at runtime by default on release mode. on debug mode, this message will be logged at runtime.</td>
+</tr>
+<tr>
+ <td>INFO</td>
+ <td>Information message - Normal operational messages. above of this priority will always be logged.</td>
+</tr>
+<tr>
+ <td>WARN</td>
+ <td>Warning messages - not an error, but indication that an error will occur if action is not taken</td>
+</tr>
+<tr>
+ <td>ERROR</td>
+ <td>Error message - indicate error. </td>
+</tr>
+<tr>
+ <td>FATAL</td>
+ <td>Fatal message - Should be corrected immediately ( not used yet )</td>
+</tr>
+</table>
+
+ <h2 class="pg">Tag</h2>
+Used to identify the source of a log message.
+There is no naming limitation, but do not forget that tag is identification of module. Tag must be distinguishable from other tag.
+Simplified macro like LOGV, LOGD, LOGI, LOGW, LOGE uses declared LOG_TAG constant, so declare a LOG_TAG constant before you use dlog macro is a good convention.
+@code
+#define LOG_TAG "MyApp"
+@endcode
+
+<h1 class="pg">list of dlog macro</h1>
+Macro name start with LOG prefix is for application. start with SLOG prefix is for framework, start with RLOG prefix is for radio. each macro write log message to separated log device such as main, system, radio.
+
+<h1 class="pg">sample code</h1>
+Using simplified macro with current LOG_TAG
+
+@code
+#define LOG_TAG "YOUR_APP"
+#include <dlog.h>
+
+int function () {
+ LOGD( "debug message from YOUR_APP \n");
+ LOGI( "information message from YOUR_APP \n");
+ LOGW( "warning message from YOUR_APP \n");
+ LOGE( "error message from YOUR_APP \n");
+}
+@endcode
+
+Using log macro allows you to specify a priority and a tag
+
+@code
+#include <dlog.h>
+
+#define TAG_DRM_SVC "drm_svc"
+#define TAG_DRM_WM "drm_wm"
+#define TAG_DRM_OEM "drm_oem"
+
+int function () {
+ LOG(LOG_DEBUG,TAG_DRM_SVC, "information message from drm_svc \n");
+ LOG(LOG_WARN,TAG_DRM_WM, "warning message from drm_wm \n");
+ LOG(LOG_ERROR,TAG_DRM_OEM, "error message from drm_oem \n");
+}
+@endcode
+
+Using log macro allows you to pass in a varargs
+
+@code
+#include <dlog.h>
+
+#define TAG_DRM_SVC "drm_svc"
+#define TAG_DRM_WM "drm_wm"
+#define TAG_DRM_OEM "drm_oem"
+
+int function (const char *fmt, ...) {
+ va_list ap;
+ va_start(ap, fmt);
+ LOG_VA(LOG_DEBUG,TAG_DRM_WM, fmt, args);
+ va_end(ap);
+}
+@endcode
+<h1 class="pg">dlogutil</h1>
+ <h2 class="pg">Introduction</h2>
+You can use dlogutil command to view and follow the contents of the log buffers. The general usage is :
+@code
+dlogutil [<option>] ¡¦ [<filter-spec>] ¡¦
+@endcode
+
+ <h2 class="pg">Filtering log output</h2>
+Every log message has a <I>tag</I> and a <I>priority</I> associated with it.
+Filter expression follows this format <B><I>tag:priority</I></B> where <I>tag</I> indicates the tag of interest and <I>priority</I> indicates the minimum level of priority to report for that tag. You can add any number of tag:priority specifications in a single filter expression.
+The tag of a log message is a short indicating the system component from which the message originates
+The <I>priority</I> is one of the following character values, orderd from lowest to highest priority:<br>
+V - verbose<br>
+D - debug<br>
+I - info<br>
+W - warning<br>
+E - Error<br>
+F - Fatal<br>
+
+for example, if you want to see MyApp tag and above of debug priority,
+@code
+# dlogutil MyApp:D
+@endcode
+if you want to see all log message above of info priority also,
+@code
+# dlogutil MyApp:D *:E
+@endcode
+
+ <h2 class="pg">List of logutil command options</h2>
+
+<table>
+<tr>
+ <th>Option</th>
+ <th>Description</th>
+</tr>
+<tr>
+ <td>-b <buffer> </td>
+ <td>Alternate log buffer. The main buffer is used by default buffer. </td>
+</tr>
+<tr>
+ <td>-c</td>
+ <td>Clears the entire log and exits</td>
+</tr>
+<tr>
+ <td>-d</td>
+ <td>Dumps the log and exits.</td>
+</tr>
+<tr>
+ <td>-f <filename></td>
+ <td>Writes log to <filename>. The default is stdout</td>
+</tr>
+<tr>
+ <td>-g</td>
+ <td>Print the size of the specified log buffer and exits.</td>
+</tr>
+<tr>
+ <td>-n <count></td>
+ <td>Sets the maximum number of rotated logs to <count>. The default value is 4. Requires the -r option</td>
+</tr>
+<tr>
+ <td>-r <Kbytes></td>
+ <td>Rotates the log file every <Kbytes> of output. The default value is 16. Requires the -f option.</td>
+</tr>
+<tr>
+ <td>-s</td>
+ <td>Sets the default filter spec to silent.</td>
+</tr>
+<tr>
+ <td>-v <format></td>
+ <td>Sets the output format for log messages. The default is brief format. </td>
+</tr>
+
+</table>
+
+
+
+@}
+**/
--- /dev/null
+/*
+ * DLOG
+ * Copyright (c) 2005-2008, The Android Open Source Project
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @file dlog.h
+ * @version 0.4
+ * @brief This file is the header file of interface of dlog.
+ */
+/**
+ * @addtogroup APPLICATION_FRAMEWORK
+ * @{
+ *
+ * @defgroup dlog dlog
+ * @addtogroup dlog
+ * @{
+
+ */
+#ifndef _DLOG_H_
+#define _DLOG_H_
+
+#include<stdarg.h>
+#include<string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * Normally we strip LOGV (VERBOSE messages) from release builds.
+ */
+#ifndef LOG_NDEBUG
+#ifdef NDEBUG
+#define LOG_NDEBUG 1
+#else
+#define LOG_NDEBUG 0
+#endif
+#endif
+
+/*
+ * This is the local tag used for the following simplified
+ * logging macros. You can change this preprocessor definition
+ * before using the other macros to change the tag.
+ */
+#ifndef LOG_TAG
+#define LOG_TAG NULL
+#endif
+
+#define LOG_ON() _get_logging_on()
+
+#ifndef __MODULE__
+#define __MODULE__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+#endif
+/*
+ * log priority values, in ascending priority order.
+ */
+typedef enum {
+ DLOG_UNKNOWN = 0,
+ DLOG_DEFAULT,
+ DLOG_VERBOSE,
+ DLOG_DEBUG,
+ DLOG_INFO,
+ DLOG_WARN,
+ DLOG_ERROR,
+ DLOG_FATAL,
+ DLOG_SILENT,
+} log_priority;
+
+typedef enum {
+ LOG_ID_MAIN = 0,
+ LOG_ID_RADIO,
+ LOG_ID_SYSTEM,
+ LOG_ID_APPS,
+ LOG_ID_MAX
+} log_id_t;
+
+#define CONDITION(cond) (__builtin_expect((cond) != 0, 0))
+
+// ---------------------------------------------------------------------
+/**
+ * Simplified macro to send a verbose log message using the current LOG_TAG.
+ */
+#ifndef LOGV
+#if LOG_NDEBUG
+#define LOGV(...) (0)
+#else
+#define LOGV(format, arg...) \
+ (LOG_ON() ? (LOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+#endif
+/**
+ * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef LOGV_IF
+#if LOG_NDEBUG
+#define LOGV_IF(cond, format, arg...) (0)
+#else
+#define LOGV_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (LOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+#endif
+/**
+ * Simplified macro to send a debug log message using the current LOG_TAG.
+ */
+#ifndef LOGD
+#define LOGD(format, arg...) \
+ (LOG_ON() ? (LOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef LOGD_IF
+#define LOGD_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (LOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified macro to send an info log message using the current LOG_TAG.
+ */
+#ifndef LOGI
+#define LOGI(format, arg...) \
+ (LOG_ON() ? (LOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef LOGI_IF
+#define LOGI_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (LOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified macro to send a warning log message using the current LOG_TAG.
+ */
+#ifndef LOGW
+#define LOGW(format, arg...) \
+ (LOG_ON() ? (LOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef LOGW_IF
+#define LOGW_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (LOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified macro to send an error log message using the current LOG_TAG.
+ */
+#ifndef LOGE
+#define LOGE(format, arg...) \
+ (LOG_ON() ? (LOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef LOGE_IF
+#define LOGE_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (LOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified macro to send an error log message using the current LOG_TAG.
+ */
+#ifndef LOGF
+#define LOGF(format, arg...) \
+ (LOG_ON() ? (LOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef LOGF_IF
+#define LOGF_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (LOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+// ---------------------------------------------------------------------
+/**
+ * Simplified radio macro to send a verbose log message using the current LOG_TAG.
+ */
+#ifndef RLOGV
+#if LOG_NDEBUG
+#define RLOGV(...) (0)
+#else
+#define RLOGV(format, arg...) \
+ (LOG_ON() ? (RLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+#endif
+/**
+ * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef RLOGV_IF
+#if LOG_NDEBUG
+#define RLOGV_IF(cond, format, arg...) (0)
+#else
+#define RLOGV_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (RLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+#endif
+
+/**
+ * Simplified radio macro to send a debug log message using the current LOG_TAG.
+ */
+#ifndef RLOGD
+#define RLOGD(format, arg...) \
+ (LOG_ON() ? (RLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef RLOGD_IF
+#define RLOGD_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (RLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified radio macro to send an info log message using the current LOG_TAG.
+ */
+#ifndef RLOGI
+#define RLOGI(format, arg...) \
+ (LOG_ON() ? (RLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef RLOGI_IF
+#define RLOGI_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (RLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified radio macro to send a warning log message using the current LOG_TAG.
+ */
+#ifndef RLOGW
+#define RLOGW(format, arg...) \
+ (LOG_ON() ? (RLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef RLOGW_IF
+#define RLOGW_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (RLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified radio macro to send an error log message using the current LOG_TAG.
+ */
+#ifndef RLOGE
+#define RLOGE(format, arg...) \
+ (LOG_ON() ? (RLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef RLOGE_IF
+#define RLOGE_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (RLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified radio macro to send an error log message using the current LOG_TAG.
+ */
+#ifndef RLOGF
+#define RLOGF(format, arg...) \
+ (LOG_ON() ? (RLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef RLOGF_IF
+#define RLOGF_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (RLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+
+// ---------------------------------------------------------------------
+/**
+ * Simplified system macro to send a verbose log message using the current LOG_TAG.
+ */
+#ifndef SLOGV
+#if LOG_NDEBUG
+#define SLOGV(...) (0)
+#else
+#define SLOGV(format, arg...) \
+ (LOG_ON() ? (SLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+#endif
+/**
+ * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef SLOGV_IF
+#if LOG_NDEBUG
+#define SLOGV_IF(cond, format, arg...) (0)
+#else
+#define SLOGV_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (SLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+#endif
+
+/**
+ * Simplified system macro to send a debug log message using the current LOG_TAG.
+ */
+#ifndef SLOGD
+#define SLOGD(format, arg...) \
+ (LOG_ON() ? (SLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef SLOGD_IF
+#define SLOGD_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (SLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified system macro to send an info log message using the current LOG_TAG.
+ */
+#ifndef SLOGI
+#define SLOGI(format, arg...) \
+ (LOG_ON() ? (SLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef SLOGI_IF
+#define SLOGI_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (SLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified system macro to send a warning log message using the current LOG_TAG.
+ */
+#ifndef SLOGW
+#define SLOGW(format, arg...) \
+ (LOG_ON() ? (SLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef SLOGW_IF
+#define SLOGW_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (SLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+/**
+ * Simplified system macro to send an error log message using the current LOG_TAG.
+ */
+#ifndef SLOGE
+#define SLOGE(format, arg...) \
+ (LOG_ON() ? (SLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef SLOGE_IF
+#define SLOGE_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (SLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified system macro to send an error log message using the current LOG_TAG.
+ */
+#ifndef SLOGF
+#define SLOGF(format, arg...) \
+ (LOG_ON() ? (SLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+/**
+ * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
+ */
+#ifndef SLOGF_IF
+#define SLOGF_IF(cond, format, arg...) \
+ (((CONDITION(cond)) && (LOG_ON())) ? \
+ (SLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
+#endif
+
+// ---------------------------------------------------------------------
+
+/**
+ * Simplified macro to send a verbose log message using the current LOG_TAG.
+ */
+#ifndef ALOGV
+#if LOG_NDEBUG
+#define ALOGV(...) (0)
+#else
+#define ALOGV(...) (ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
+#endif
+#endif
+/**
+ * Simplified macro to send a debug log message using the current LOG_TAG.
+ */
+#ifndef ALOGD
+#define ALOGD(...) (ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
+#endif
+/**
+ * Simplified macro to send an info log message using the current LOG_TAG.
+ */
+#ifndef ALOGI
+#define ALOGI(...) (ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
+#endif
+/**
+ * Simplified macro to send a warning log message using the current LOG_TAG.
+ */
+#ifndef ALOGW
+#define ALOGW(...) (ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__))
+#endif
+/**
+ * Simplified macro to send an error log message using the current LOG_TAG.
+ */
+#ifndef ALOGE
+#define ALOGE(...) (ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
+#endif
+
+// ---------------------------------------------------------------------
+/**
+ * Basic log message macro that allows you to specify a priority and a tag
+ *
+ * Example:
+ * LOG(DLOG_WARN, NULL, "Failed with error %d", errno);
+ *
+ * The second argument may be NULL or "" to indicate the "global" tag.
+ *
+ * Future work : we want to put filename and line number automatically only when debug build mode
+ */
+#ifndef LOG
+#define LOG(priority, tag, ...) \
+ print_log(D##priority, tag, __VA_ARGS__)
+#endif
+
+/**
+ * Log macro that allows you to pass in a varargs ("args" is a va_list).
+ */
+#ifndef LOG_VA
+#define LOG_VA(priority, tag, fmt, args) \
+ vprint_log(D##priority, tag, fmt, args)
+#endif
+
+#ifndef ALOG
+#define ALOG(priority, tag, ...) \
+ print_apps_log(D##priority, tag, __VA_ARGS__)
+#endif
+/**
+ * Log macro that allows you to pass in a varargs ("args" is a va_list).
+ */
+#ifndef ALOG_VA
+#define ALOG_VA(priority, tag, fmt, args) \
+ vprint_apps_log(D##priority, tag, fmt, args)
+#endif
+
+/**
+ * Basic radio log macro that allows you to specify a priority and a tag.
+ */
+#ifndef RLOG
+#define RLOG(priority, tag, ...) \
+ print_radio_log(D##priority, tag, __VA_ARGS__)
+#endif
+/**
+ * Radio log macro that allows you to pass in a varargs ("args" is a va_list).
+ */
+#ifndef RLOG_VA
+#define RLOG_VA(priority, tag, fmt, args) \
+ vprint_radio_log(D##priority, tag, fmt, args)
+#endif
+
+/**
+ * Basic system log macro that allows you to specify a priority and a tag.
+ */
+#ifndef SLOG
+#define SLOG(priority, tag, ...) \
+ print_system_log(D##priority, tag, __VA_ARGS__)
+#endif
+
+/**
+ * System log macro that allows you to pass in a varargs ("args" is a va_list).
+ */
+#ifndef SLOG_VA
+#define SLOG_VA(priority, tag, fmt, args) \
+ vprint_system_log(D##priority, tag, fmt, args)
+#endif
+
+
+/*
+ * ===========================================================================
+ *
+ * The stuff in the rest of this file should not be used directly.
+ */
+
+#define print_apps_log(prio, tag, fmt...) \
+ __dlog_print(LOG_ID_APPS, prio, tag, fmt)
+
+#define vprint_apps_log(prio, tag, fmt...) \
+ __dlog_vprint(LOG_ID_APPS, prio, tag, fmt)
+
+#define print_log(prio, tag, fmt...) \
+ __dlog_print(LOG_ID_MAIN, prio, tag, fmt)
+
+#define vprint_log(prio, tag, fmt...) \
+ __dlog_vprint(LOG_ID_MAIN, prio, tag, fmt)
+
+#define print_radio_log(prio, tag, fmt...)\
+ __dlog_print(LOG_ID_RADIO, prio, tag, fmt)
+
+#define vprint_radio_log(prio, tag, fmt...) \
+ __dlog_vprint(LOG_ID_RADIO, prio, tag, fmt)
+
+#define print_system_log(prio, tag, fmt...)\
+ __dlog_print(LOG_ID_SYSTEM, prio, tag, fmt)
+
+#define vprint_system_log(prio, tag, fmt...) \
+ __dlog_vprint(LOG_ID_SYSTEM, prio, tag, fmt)
+
+/**
+ * @brief send log. must specify log_id ,priority, tag and format string.
+ * @pre none
+ * @post none
+ * @see __dlog_print
+ * @remarks you must not use this API directly. use macros instead.
+ * @param[in] log_id log device id
+ * @param[in] prio priority
+ * @param[in] tag tag
+ * @param[in] fmt format string
+ * @return Operation result
+ * @retval 0>= Success
+ * @retval -1 Error
+ * @code
+// you have to use LOG(), SLOG(), RLOG() family not to use __dlog_print() directly
+// so below example is just for passing Documentation Verification !!!
+#define LOG_TAG USR_TAG
+#include<dlog.h>
+ __dlog_print(LOG_ID_MAIN, DLOG_INFO, USR_TAG, "you must not use this API directly");
+ * @endcode
+ */
+int __dlog_print(log_id_t log_id, int prio, const char *tag, const char *fmt, ...);
+
+/**
+ * @brief send log with va_list. must specify log_id ,priority, tag and format string.
+ * @pre none
+ * @post none
+ * @see __dlog_print
+ * @remarks you must not use this API directly. use macros instead.
+ * @param[in] log_id log device id
+ * @param[in] prio priority
+ * @param[in] tag tag
+ * @param[in] fmt format string
+ * @param[in] ap va_list
+ * @return Operation result
+ * @retval 0>= Success
+ * @retval -1 Error
+ * @code
+ // you have to use LOG_VA(), SLOG_VA(), RLOG_VA() family not to use __dlog_print() directly
+ // so below example is just for passing Documentation Verification !!!
+#define LOG_TAG USR_TAG
+#include<dlog.h>
+ __dlog_vprint(LOG_ID_MAIN, DLOG_INFO, USR_TAG, "you must not use this API directly", ap);
+ * @endcode
+ */
+int __dlog_vprint(log_id_t log_id, int prio, const char *tag, const char *fmt, va_list ap);
+int _get_logging_on(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+/** @} */
+/** @} */
+
+#endif /* _DLOG_H_*/
+
--- /dev/null
+/*
+ * DLOG
+ * Copyright (c) 2005-2008, The Android Open Source Project
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UTILS_LOGGER_H
+#define _UTILS_LOGGER_H
+
+#include <stdint.h>
+
+struct logger_entry {
+ uint16_t len; /* length of the payload */
+ uint16_t __pad; /* no matter what, we get 2 bytes of padding */
+ int32_t pid; /* generating process's pid */
+ int32_t tid; /* generating process's tid */
+ int32_t sec; /* seconds since Epoch */
+ int32_t nsec; /* nanoseconds */
+ char msg[0]; /* the entry's payload */
+};
+
+#define LOGGER_LOG_MAIN "log_main"
+#define LOGGER_LOG_RADIO "log_radio"
+#define LOGGER_LOG_SYSTEM "log_system"
+#define LOGGER_LOG_APPS "log_apps"
+
+#define LOGGER_ENTRY_MAX_LEN (4*1024)
+#define LOGGER_ENTRY_MAX_PAYLOAD (LOGGER_ENTRY_MAX_LEN - sizeof(struct logger_entry))
+
+//#ifdef HAVE_IOCTL
+
+#include <sys/ioctl.h>
+
+#define __LOGGERIO 0xAE
+
+#define LOGGER_GET_LOG_BUF_SIZE _IO(__LOGGERIO, 1) /* size of log */
+#define LOGGER_GET_LOG_LEN _IO(__LOGGERIO, 2) /* used log len */
+#define LOGGER_GET_NEXT_ENTRY_LEN _IO(__LOGGERIO, 3) /* next entry len */
+#define LOGGER_FLUSH_LOG _IO(__LOGGERIO, 4) /* flush log */
+
+//#endif // HAVE_IOCTL
+
+#endif /* _UTILS_LOGGER_H */
--- /dev/null
+/*
+ * DLOG
+ * Copyright (c) 2005-2008, The Android Open Source Project
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOGPRINT_H
+#define _LOGPRINT_H
+
+#include <time.h>
+#include <pthread.h>
+
+#include <logger.h>
+#include <dlog.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ FORMAT_OFF = 0,
+ FORMAT_BRIEF,
+ FORMAT_PROCESS,
+ FORMAT_TAG,
+ FORMAT_THREAD,
+ FORMAT_RAW,
+ FORMAT_TIME,
+ FORMAT_THREADTIME,
+ FORMAT_LONG,
+} log_print_format;
+
+typedef struct log_format_t log_format;
+
+typedef struct log_entry_t {
+ time_t tv_sec;
+ long tv_nsec;
+ log_priority priority;
+ pid_t pid;
+ pthread_t tid;
+ const char * tag;
+ size_t messageLen;
+ const char * message;
+} log_entry;
+
+log_format *log_format_new();
+
+void log_format_free(log_format *p_format);
+
+void log_set_print_format(log_format *p_format,
+ log_print_format format);
+
+/**
+ * Returns FORMAT_OFF on invalid string
+ */
+log_print_format log_format_from_string(const char *s);
+
+/**
+ * filterExpression: a single filter expression
+ * eg "AT:d"
+ *
+ * returns 0 on success and -1 on invalid expression
+ *
+ * Assumes single threaded execution
+ *
+ */
+
+int log_add_filter_rule(log_format *p_format,
+ const char *filterExpression);
+
+
+/**
+ * filterString: a whitespace-separated set of filter expressions
+ * eg "AT:d *:i"
+ *
+ * returns 0 on success and -1 on invalid expression
+ *
+ * Assumes single threaded execution
+ *
+ */
+
+int log_add_filter_string(log_format *p_format,
+ const char *filterString);
+
+
+/**
+ * returns 1 if this log line should be printed based on its priority
+ * and tag, and 0 if it should not
+ */
+int log_should_print_line (
+ log_format *p_format, const char *tag, log_priority pri);
+
+
+/**
+ * Splits a wire-format buffer into an log_entry
+ * entry allocated by caller. Pointers will point directly into buf
+ *
+ * Returns 0 on success and -1 on invalid wire format (entry will be
+ * in unspecified state)
+ */
+int log_process_log_buffer(struct logger_entry *buf,
+ log_entry *entry);
+
+/**
+ * Formats a log message into a buffer
+ *
+ * Uses defaultBuffer if it can, otherwise malloc()'s a new buffer
+ * If return value != defaultBuffer, caller must call free()
+ * Returns NULL on malloc error
+ */
+
+char *log_format_log_line (
+ log_format *p_format,
+ char *defaultBuffer,
+ size_t defaultBufferSize,
+ const log_entry *p_line,
+ size_t *p_outLength);
+
+
+/**
+ * Either print or do not print log line, based on filter
+ *
+ * Assumes single threaded execution
+ *
+ */
+int log_print_log_line(
+ log_format *p_format,
+ int fd,
+ const log_entry *entry);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_LOGPRINT_H*/
--- /dev/null
+/*
+ * DLOG
+ * Copyright (c) 2005-2008, The Android Open Source Project
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <pthread.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <fcntl.h>
+#include <sys/uio.h>
+#include <stdio.h>
+#include <errno.h>
+#include <dlog.h>
+#ifdef SD_JOURNAL_SUPPORT
+#include <syslog.h>
+#include <systemd/sd-journal.h>
+#endif
+#define LOG_BUF_SIZE 1024
+
+#define LOG_MAIN "log_main"
+#define LOG_RADIO "log_radio"
+#define LOG_SYSTEM "log_system"
+#define LOG_APPS "log_apps"
+
+static int log_fds[(int)LOG_ID_MAX] = { -1, -1, -1, -1 };
+
+static int g_logging_on = 1;
+static int g_dlog_level = DLOG_SILENT;
+
+static int __dlog_init(log_id_t, log_priority, const char *tag, const char *msg);
+static int (*write_to_log)(log_id_t, log_priority, const char *tag, const char *msg) = __dlog_init;
+static pthread_mutex_t log_init_lock = PTHREAD_MUTEX_INITIALIZER;
+static int __write_to_log_null(log_id_t log_id, log_priority prio, const char *tag, const char *msg)
+{
+ return -1;
+}
+static int __write_to_log_kernel(log_id_t log_id, log_priority prio, const char *tag, const char *msg)
+{
+ ssize_t ret;
+ int log_fd;
+ struct iovec vec[3];
+
+ if (log_id < LOG_ID_APPS) {
+ if(prio < g_dlog_level) {
+ return 0;
+ }
+ } else if (LOG_ID_MAX <= log_id) {
+ return 0;
+ }
+ if (log_id < LOG_ID_MAX)
+ log_fd = log_fds[log_id];
+ else
+ return -1; // for TC
+
+ if (!tag)
+ tag = "";
+
+ if (!msg)
+ return -1;
+
+ vec[0].iov_base = (unsigned char *) &prio;
+ vec[0].iov_len = 1;
+ vec[1].iov_base = (void *) tag;
+ vec[1].iov_len = strlen(tag) + 1;
+ vec[2].iov_base = (void *) msg;
+ vec[2].iov_len = strlen(msg) + 1;
+
+ ret = writev(log_fd, vec, 3);
+
+ return ret;
+}
+static char dlog_pri_to_char (log_priority pri)
+{
+ switch (pri) {
+ case DLOG_VERBOSE: return 'V';
+ case DLOG_DEBUG: return 'D';
+ case DLOG_INFO: return 'I';
+ case DLOG_WARN: return 'W';
+ case DLOG_ERROR: return 'E';
+ case DLOG_FATAL: return 'F';
+ case DLOG_SILENT: return 'S';
+
+ case DLOG_DEFAULT:
+ case DLOG_UNKNOWN:
+ default:
+ return '?';
+ }
+}
+#ifdef SD_JOURNAL_SUPPORT
+static int dlog_pri_to_journal_pri(log_priority prio)
+{
+ int journal_prio = LOG_DEBUG;
+
+ switch(prio) {
+ case DLOG_UNKNOWN:
+ case DLOG_DEFAULT:
+ case DLOG_VERBOSE:
+ journal_prio = LOG_DEBUG;
+ break;
+ case DLOG_DEBUG:
+ journal_prio = LOG_DEBUG;
+ break;
+ case DLOG_INFO:
+ journal_prio = LOG_INFO;
+ break;
+ case DLOG_WARN:
+ journal_prio = LOG_WARNING;
+ break;
+ case DLOG_ERROR:
+ journal_prio = LOG_ERR;
+ break;
+ case DLOG_FATAL:
+ journal_prio = LOG_CRIT;
+ break;
+ case DLOG_SILENT:
+ default:
+ journal_prio = -1;
+ break;
+ }
+ return journal_prio;
+}
+static int __write_to_log_sd_journal_print(log_id_t log_id, log_priority prio, const char *tag, const char *msg)
+{
+ ssize_t ret;
+ int log_fd;
+
+ if (log_id < LOG_ID_APPS) {
+ if(prio < g_dlog_level) {
+ return 0;
+ }
+ } else if (LOG_ID_MAX <= log_id) {
+ return 0;
+ }
+ if (log_id < LOG_ID_MAX)
+ log_fd = log_fds[log_id];
+ else
+ return -1;
+ return sd_journal_print(dlog_pri_to_journal_pri(prio), "%c %s: %s",dlog_pri_to_char(prio), tag, msg);
+}
+#endif
+void init_dlog_level(void)
+{
+ char *dlog_level_env;
+ char *logging_mode_env;
+ if (g_logging_on) {
+ logging_mode_env = getenv("TIZEN_PLATFORMLOGGING_MODE");
+ if (!logging_mode_env)
+ g_logging_on = 0;
+ else
+ g_logging_on = atoi(logging_mode_env);
+ }
+ if (g_logging_on) {
+ dlog_level_env = getenv("TIZEN_DLOG_LEVEL");
+ if (!dlog_level_env) {
+ g_dlog_level = 8;
+ } else {
+ g_dlog_level = atoi(dlog_level_env);
+ }
+ } else
+ g_dlog_level = 8;
+}
+static int __dlog_init(log_id_t log_id, log_priority prio, const char *tag, const char *msg)
+{
+ pthread_mutex_lock(&log_init_lock);
+ // get filtering info
+ // open device
+ if (write_to_log == __dlog_init) {
+ init_dlog_level();
+
+ log_fds[LOG_ID_MAIN] = open("/dev/"LOG_MAIN, O_WRONLY);
+ log_fds[LOG_ID_RADIO] = open("/dev/"LOG_RADIO, O_WRONLY);
+ log_fds[LOG_ID_SYSTEM] = open("/dev/"LOG_SYSTEM, O_WRONLY);
+ log_fds[LOG_ID_APPS] = open("/dev/"LOG_APPS, O_WRONLY);
+
+ if (log_fds[LOG_ID_MAIN] < 0 || log_fds[LOG_ID_RADIO] < 0) {
+ fprintf(stderr, "open log dev is failed\n");
+ write_to_log = __write_to_log_null;
+ } else {
+#ifdef SD_JOURNAL_SUPPORT
+ write_to_log = __write_to_log_sd_journal_print;
+#else
+ write_to_log = __write_to_log_kernel;
+#endif
+ }
+
+ if (log_fds[LOG_ID_SYSTEM] < 0)
+ log_fds[LOG_ID_SYSTEM] = log_fds[LOG_ID_MAIN];
+
+ if (log_fds[LOG_ID_APPS] < 0)
+ log_fds[LOG_ID_APPS] = log_fds[LOG_ID_MAIN];
+ }
+ pthread_mutex_unlock(&log_init_lock);
+ return write_to_log(log_id, prio, tag, msg);
+}
+
+int __dlog_vprint(log_id_t log_id, int prio, const char *tag, const char *fmt, va_list ap)
+{
+ char buf[LOG_BUF_SIZE];
+
+ vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
+
+ return write_to_log(log_id, prio, tag, buf);
+}
+
+int __dlog_print(log_id_t log_id, int prio, const char *tag, const char *fmt, ...)
+{
+ va_list ap;
+ char buf[LOG_BUF_SIZE];
+
+ va_start(ap, fmt);
+ vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
+ va_end(ap);
+
+ return write_to_log(log_id, prio, tag, buf);
+}
+int _get_logging_on(void)
+{
+ return g_logging_on;
+}
--- /dev/null
+/*
+ * DLOG
+ * Copyright (c) 2005-2008, The Android Open Source Project
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <errno.h>
+#include <ctype.h>
+#include <unistd.h>
+
+#include <logprint.h>
+
+
+typedef struct FilterInfo_t {
+ char *mTag;
+ log_priority mPri;
+ struct FilterInfo_t *p_next;
+} FilterInfo;
+
+struct log_format_t {
+ log_priority global_pri;
+ FilterInfo *filters;
+ log_print_format format;
+};
+
+static FilterInfo * filterinfo_new(const char *tag, log_priority pri)
+{
+ FilterInfo *p_ret;
+ p_ret = (FilterInfo *)calloc(1, sizeof(FilterInfo));
+ p_ret->mTag = strdup(tag);
+ p_ret->mPri = pri;
+
+ return p_ret;
+}
+
+static void filterinfo_free(FilterInfo *p_info)
+{
+ if (p_info == NULL) {
+ return;
+ }
+
+ free(p_info->mTag);
+ p_info->mTag = NULL;
+}
+
+/*
+ * Note: also accepts 0-9 priorities
+ * returns DLOG_UNKNOWN if the character is unrecognized
+ */
+static log_priority filter_char_to_pri (char c)
+{
+ log_priority pri;
+
+ c = tolower(c);
+
+ if (c >= '0' && c <= '9') {
+ if (c >= ('0'+DLOG_SILENT)) {
+ pri = DLOG_VERBOSE;
+ } else {
+ pri = (log_priority)(c - '0');
+ }
+ } else if (c == 'v') {
+ pri = DLOG_VERBOSE;
+ } else if (c == 'd') {
+ pri = DLOG_DEBUG;
+ } else if (c == 'i') {
+ pri = DLOG_INFO;
+ } else if (c == 'w') {
+ pri = DLOG_WARN;
+ } else if (c == 'e') {
+ pri = DLOG_ERROR;
+ } else if (c == 'f') {
+ pri = DLOG_FATAL;
+ } else if (c == 's') {
+ pri = DLOG_SILENT;
+ } else if (c == '*') {
+ pri = DLOG_DEFAULT;
+ } else {
+ pri = DLOG_UNKNOWN;
+ }
+
+ return pri;
+}
+
+static char filter_pri_to_char (log_priority pri)
+{
+ switch (pri) {
+ case DLOG_VERBOSE: return 'V';
+ case DLOG_DEBUG: return 'D';
+ case DLOG_INFO: return 'I';
+ case DLOG_WARN: return 'W';
+ case DLOG_ERROR: return 'E';
+ case DLOG_FATAL: return 'F';
+ case DLOG_SILENT: return 'S';
+
+ case DLOG_DEFAULT:
+ case DLOG_UNKNOWN:
+ default: return '?';
+ }
+}
+
+static log_priority filter_pri_for_tag(log_format *p_format, const char *tag)
+{
+ FilterInfo *p_curFilter;
+// log_priority pri = DLOG_SILENT;
+ for (p_curFilter = p_format->filters; p_curFilter != NULL; p_curFilter = p_curFilter->p_next )
+ {
+ if (0 == strcmp(tag, p_curFilter->mTag))
+ {
+ if (p_curFilter->mPri == DLOG_DEFAULT) {
+ return p_format->global_pri;
+ } else {
+ return p_curFilter->mPri;
+ }
+ }
+ }
+ return p_format->global_pri;
+}
+
+/** for debugging */
+void dump_filters(log_format *p_format)
+{
+ FilterInfo *p_fi;
+
+ for (p_fi = p_format->filters ; p_fi != NULL ; p_fi = p_fi->p_next) {
+ char cPri = filter_pri_to_char(p_fi->mPri);
+ if (p_fi->mPri == DLOG_DEFAULT) {
+ cPri = filter_pri_to_char(p_format->global_pri);
+ }
+ fprintf(stderr,"%s:%c\n", p_fi->mTag, cPri);
+ }
+
+ fprintf(stderr,"*:%c\n", filter_pri_to_char(p_format->global_pri));
+
+}
+
+/**
+ * returns 1 if this log line should be printed based on its priority
+ * and tag, and 0 if it should not
+ */
+int log_should_print_line (log_format *p_format, const char *tag, log_priority pri)
+{
+ return pri >= filter_pri_for_tag(p_format, tag);
+}
+
+log_format *log_format_new()
+{
+ log_format *p_ret;
+
+ p_ret = calloc(1, sizeof(log_format));
+
+ p_ret->global_pri = DLOG_SILENT;
+ p_ret->format = FORMAT_BRIEF;
+
+ return p_ret;
+}
+
+void log_format_free(log_format *p_format)
+{
+ FilterInfo *p_info, *p_info_old;
+
+ p_info = p_format->filters;
+
+ while (p_info != NULL) {
+ p_info_old = p_info;
+ p_info = p_info->p_next;
+
+ free(p_info_old);
+ }
+
+ free(p_format);
+}
+
+void log_set_print_format(log_format *p_format,log_print_format format)
+{
+ p_format->format=format;
+}
+
+
+
+/**
+ * Returns FORMAT_OFF on invalid string
+ */
+log_print_format log_format_from_string(const char * formatString)
+{
+ static log_print_format format;
+
+ if (strcmp(formatString, "brief") == 0) format = FORMAT_BRIEF;
+ else if (strcmp(formatString, "process") == 0) format = FORMAT_PROCESS;
+ else if (strcmp(formatString, "tag") == 0) format = FORMAT_TAG;
+ else if (strcmp(formatString, "thread") == 0) format = FORMAT_THREAD;
+ else if (strcmp(formatString, "raw") == 0) format = FORMAT_RAW;
+ else if (strcmp(formatString, "time") == 0) format = FORMAT_TIME;
+ else if (strcmp(formatString, "threadtime") == 0) format = FORMAT_THREADTIME;
+ else if (strcmp(formatString, "long") == 0) format = FORMAT_LONG;
+ else format = FORMAT_OFF;
+
+ return format;
+}
+
+/**
+ * filterExpression: a single filter expression
+ * eg "AT:d"
+ *
+ * returns 0 on success and -1 on invalid expression
+ *
+ * Assumes single threaded execution
+ */
+
+int log_add_filter_rule(log_format *p_format,
+ const char *filterExpression)
+{
+// size_t i=0;
+ size_t tagNameLength;
+ log_priority pri = DLOG_DEFAULT;
+
+ tagNameLength = strcspn(filterExpression, ":");
+
+ if (tagNameLength == 0) {
+ goto error;
+ }
+
+ if(filterExpression[tagNameLength] == ':') {
+ pri = filter_char_to_pri(filterExpression[tagNameLength+1]);
+
+ if (pri == DLOG_UNKNOWN) {
+ goto error;
+ }
+ }
+
+ if(0 == strncmp("*", filterExpression, tagNameLength)) {
+ // This filter expression refers to the global filter
+ // The default level for this is DEBUG if the priority
+ // is unspecified
+ if (pri == DLOG_DEFAULT) {
+ pri = DLOG_DEBUG;
+ }
+
+ p_format->global_pri = pri;
+ } else {
+ // for filter expressions that don't refer to the global
+ // filter, the default is verbose if the priority is unspecified
+ if (pri == DLOG_DEFAULT) {
+ pri = DLOG_VERBOSE;
+ }
+
+ char *tagName;
+ tagName = strndup(filterExpression, tagNameLength);
+
+ FilterInfo *p_fi = filterinfo_new(tagName, pri);
+ free(tagName);
+
+ p_fi->p_next = p_format->filters;
+ p_format->filters = p_fi;
+ }
+
+ return 0;
+error:
+ return -1;
+}
+
+
+/**
+ * filterString: a comma/whitespace-separated set of filter expressions
+ *
+ * eg "AT:d *:i"
+ *
+ * returns 0 on success and -1 on invalid expression
+ *
+ * Assumes single threaded execution
+ *
+ */
+
+int log_add_filter_string(log_format *p_format,
+ const char *filterString)
+{
+ char *filterStringCopy = strdup (filterString);
+ char *p_cur = filterStringCopy;
+ char *p_ret;
+ int err;
+
+ // Yes, I'm using strsep
+ // FIXME : strtok is more portable than strsep
+ while (NULL != (p_ret = strsep(&p_cur, " \t,"))) {
+ // ignore whitespace-only entries
+ if(p_ret[0] != '\0') {
+ err = log_add_filter_rule(p_format, p_ret);
+
+ if (err < 0) {
+ goto error;
+ }
+ }
+ }
+
+ free (filterStringCopy);
+ return 0;
+error:
+ free (filterStringCopy);
+ return -1;
+}
+
+static inline char * strip_end(char *str)
+{
+ char *end = str + strlen(str) - 1;
+
+ while (end >= str && isspace(*end))
+ *end-- = '\0';
+ return str;
+}
+
+
+/**
+ * Splits a wire-format buffer into an LogEntry
+ * entry allocated by caller. Pointers will point directly into buf
+ *
+ * Returns 0 on success and -1 on invalid wire format (entry will be
+ * in unspecified state)
+ */
+int log_process_log_buffer(struct logger_entry *buf,log_entry *entry)
+{
+ size_t tag_len;
+
+ entry->tv_sec = buf->sec;
+ entry->tv_nsec = buf->nsec;
+ entry->pid = buf->pid;
+ entry->tid = buf->tid;
+
+ if (buf->msg[0] < 0 || buf->msg[0] > DLOG_SILENT) { /* char can be signed too */
+
+ /* There is no tag in this message - which is an error, but it might
+ * happen when sombody redirects stdout/err to /dev/log_*.
+ *
+ * Pick ERROR priority as this shouldn't happen.
+ */
+ entry->priority = DLOG_ERROR;
+ entry->tag = "[NO TAG]";
+ entry->messageLen = buf->len;
+ entry->message = buf->msg;
+ } else {
+ entry->priority = buf->msg[0];
+ entry->tag = buf->msg + 1;
+ tag_len = strlen(entry->tag);
+ entry->messageLen = buf->len - tag_len - 3;
+ entry->message = entry->tag + tag_len + 1;
+ }
+
+ return 0;
+}
+
+
+/**
+ * Formats a log message into a buffer
+ *
+ * Uses defaultBuffer if it can, otherwise malloc()'s a new buffer
+ * If return value != defaultBuffer, caller must call free()
+ * Returns NULL on malloc error
+ */
+
+char *log_format_log_line (
+ log_format *p_format,
+ char *defaultBuffer,
+ size_t defaultBufferSize,
+ const log_entry *entry,
+ size_t *p_outLength)
+{
+#if defined(HAVE_LOCALTIME_R)
+ struct tm tmBuf;
+#endif
+ struct tm* ptm;
+ char timeBuf[32];
+ // char headerBuf[128];
+ char prefixBuf[128], suffixBuf[128];
+ char priChar;
+ int prefixSuffixIsHeaderFooter = 0;
+ char * ret = NULL;
+
+ priChar = filter_pri_to_char(entry->priority);
+
+ /*
+ * Get the current date/time in pretty form
+ *
+ * It's often useful when examining a log with "less" to jump to
+ * a specific point in the file by searching for the date/time stamp.
+ * For this reason it's very annoying to have regexp meta characters
+ * in the time stamp. Don't use forward slashes, parenthesis,
+ * brackets, asterisks, or other special chars here.
+ */
+#if defined(HAVE_LOCALTIME_R)
+ ptm = localtime_r(&(entry->tv_sec), &tmBuf);
+#else
+ ptm = localtime(&(entry->tv_sec));
+#endif
+ //strftime(timeBuf, sizeof(timeBuf), "%Y-%m-%d %H:%M:%S", ptm);
+ strftime(timeBuf, sizeof(timeBuf), "%m-%d %H:%M:%S", ptm);
+
+ /*
+ * Construct a buffer containing the log header and log message.
+ */
+ size_t prefixLen, suffixLen;
+
+ switch (p_format->format) {
+ case FORMAT_TAG:
+ prefixLen = snprintf(prefixBuf, sizeof(prefixBuf),
+ "%c/%-8s: ", priChar, entry->tag);
+ strcpy(suffixBuf, "\n"); suffixLen = 1;
+ break;
+ case FORMAT_PROCESS:
+ prefixLen = snprintf(prefixBuf, sizeof(prefixBuf),
+ "%c(%5d) ", priChar, entry->pid);
+ suffixLen = snprintf(suffixBuf, sizeof(suffixBuf),
+ " (%s)\n", entry->tag);
+ break;
+ case FORMAT_THREAD:
+ prefixLen = snprintf(prefixBuf, sizeof(prefixBuf),
+ "%c(%5d:%5d) ", priChar, entry->pid, entry->tid);
+ strcpy(suffixBuf, "\n");
+ suffixLen = 1;
+ break;
+ case FORMAT_RAW:
+ prefixBuf[0] = 0;
+ prefixLen = 0;
+ strcpy(suffixBuf, "\n");
+ suffixLen = 1;
+ break;
+ case FORMAT_TIME:
+ prefixLen = snprintf(prefixBuf, sizeof(prefixBuf),
+ "%s.%03ld %c/%-8s(%5d): ", timeBuf, entry->tv_nsec / 1000000,
+ priChar, entry->tag, entry->pid);
+ strcpy(suffixBuf, "\n");
+ suffixLen = 1;
+ break;
+ case FORMAT_THREADTIME:
+ prefixLen = snprintf(prefixBuf, sizeof(prefixBuf),
+ "%s.%03ld %5d %5d %c %-8s: ", timeBuf, entry->tv_nsec / 1000000,
+ (int)entry->pid, (int)entry->tid, priChar, entry->tag);
+ strcpy(suffixBuf, "\n");
+ suffixLen = 1;
+ break;
+ case FORMAT_LONG:
+ prefixLen = snprintf(prefixBuf, sizeof(prefixBuf),
+ "[ %s.%03ld %5d:%5d %c/%-8s ]\n",
+ timeBuf, entry->tv_nsec / 1000000, entry->pid,
+ entry->tid, priChar, entry->tag);
+ strcpy(suffixBuf, "\n\n");
+ suffixLen = 2;
+ prefixSuffixIsHeaderFooter = 1;
+ break;
+ case FORMAT_BRIEF:
+ default:
+ prefixLen = snprintf(prefixBuf, sizeof(prefixBuf),
+ "%c/%-8s(%5d): ", priChar, entry->tag, entry->pid);
+ strcpy(suffixBuf, "\n");
+ suffixLen = 1;
+ break;
+ }
+ /* snprintf has a weird return value. It returns what would have been
+ * written given a large enough buffer. In the case that the prefix is
+ * longer then our buffer(128), it messes up the calculations below
+ * possibly causing heap corruption. To avoid this we double check and
+ * set the length at the maximum (size minus null byte)
+ */
+ if(prefixLen >= sizeof(prefixBuf))
+ prefixLen = sizeof(prefixBuf) - 1;
+ if(suffixLen >= sizeof(suffixBuf))
+ suffixLen = sizeof(suffixBuf) - 1;
+
+ /* the following code is tragically unreadable */
+
+ size_t numLines;
+// size_t i;
+ char *p;
+ size_t bufferSize;
+ const char *pm;
+
+ if (prefixSuffixIsHeaderFooter) {
+ // we're just wrapping message with a header/footer
+ numLines = 1;
+ } else {
+ pm = entry->message;
+ numLines = 0;
+
+ // The line-end finding here must match the line-end finding
+ // in for ( ... numLines...) loop below
+ while (pm < (entry->message + entry->messageLen)) {
+ if (*pm++ == '\n') numLines++;
+ }
+ // plus one line for anything not newline-terminated at the end
+ if (pm > entry->message && *(pm-1) != '\n') numLines++;
+ }
+
+ // this is an upper bound--newlines in message may be counted
+ // extraneously
+ bufferSize = (numLines * (prefixLen + suffixLen)) + entry->messageLen + 1;
+
+ if (defaultBufferSize >= bufferSize) {
+ ret = defaultBuffer;
+ } else {
+ ret = (char *)malloc(bufferSize);
+
+ if (ret == NULL) {
+ return ret;
+ }
+ }
+
+ ret[0] = '\0'; /* to start strcat off */
+
+ p = ret;
+ pm = entry->message;
+
+ if (prefixSuffixIsHeaderFooter) {
+ strcat(p, prefixBuf);
+// strncat(p, prefixBuf, sizeof(prefixBuf));
+ p += prefixLen;
+ strncat(p, entry->message, entry->messageLen);
+ p += entry->messageLen;
+ strcat(p, suffixBuf);
+// strncat(p, suffixBuf, sizeof(suffixBuf));
+ p += suffixLen;
+ } else {
+ while(pm < (entry->message + entry->messageLen)) {
+ const char *lineStart;
+ size_t lineLen;
+
+ lineStart = pm;
+
+ // Find the next end-of-line in message
+ while (pm < (entry->message + entry->messageLen)
+ && *pm != '\n') pm++;
+ lineLen = pm - lineStart;
+
+ strcat(p, prefixBuf);
+ //strncat(p, prefixBuf, sizeof(prefixBuf));
+ p += prefixLen;
+ strncat(p, lineStart, lineLen);
+ p += lineLen;
+ strcat(p, suffixBuf);
+ //strncat(p, suffixBuf, sizeof(suffixBuf));
+ p += suffixLen;
+
+ if (*pm == '\n') pm++;
+ }
+ }
+
+ if (p_outLength != NULL) {
+ *p_outLength = p - ret;
+ }
+
+ return ret;
+}
+
+/**
+ * Either print or do not print log line, based on filter
+ *
+ * Returns count bytes written
+ */
+
+int log_print_log_line(
+ log_format *p_format,
+ int fd,
+ const log_entry *entry)
+{
+ int ret;
+ char defaultBuffer[512];
+ char *outBuffer = NULL;
+ size_t totalLen;
+
+ outBuffer = log_format_log_line(p_format, defaultBuffer,sizeof(defaultBuffer), entry, &totalLen);
+
+ if (!outBuffer)
+ return -1;
+
+ do {
+ ret = write(fd, outBuffer, totalLen);
+ } while (ret < 0 && errno == EINTR);
+
+ if (ret < 0) {
+ fprintf(stderr, "+++ LOG: write failed (errno=%d)\n", errno);
+ ret = 0;
+ goto done;
+ }
+
+ if (((size_t)ret) < totalLen) {
+ fprintf(stderr, "+++ LOG: write partial (%d of %d)\n", ret,
+ (int)totalLen);
+ goto done;
+ }
+
+done:
+ if (outBuffer != defaultBuffer) {
+ free(outBuffer);
+ }
+
+ return ret;
+}
+
+
+
+void logprint_run_tests()
+{
+#if 0
+
+ fprintf(stderr, "tests disabled\n");
+
+#else
+
+ int err;
+ const char *tag;
+ log_format *p_format;
+
+ p_format = log_format_new();
+
+ fprintf(stderr, "running tests\n");
+
+ tag = "random";
+
+ log_add_filter_rule(p_format,"*:i");
+
+ assert (DLOG_INFO == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) == 0);
+ log_add_filter_rule(p_format, "*");
+ assert (DLOG_DEBUG == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) > 0);
+ log_add_filter_rule(p_format, "*:v");
+ assert (DLOG_VERBOSE == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) > 0);
+ log_add_filter_rule(p_format, "*:i");
+ assert (DLOG_INFO == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) == 0);
+
+ log_add_filter_rule(p_format, "random");
+ assert (DLOG_VERBOSE == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) > 0);
+ log_add_filter_rule(p_format, "random:v");
+ assert (DLOG_VERBOSE == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) > 0);
+ log_add_filter_rule(p_format, "random:d");
+ assert (DLOG_DEBUG == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) > 0);
+ log_add_filter_rule(p_format, "random:w");
+ assert (DLOG_WARN == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) == 0);
+
+ log_add_filter_rule(p_format, "crap:*");
+ assert (DLOG_VERBOSE== filter_pri_for_tag(p_format, "crap"));
+ assert(log_should_print_line(p_format, "crap", DLOG_VERBOSE) > 0);
+
+ // invalid expression
+ err = log_add_filter_rule(p_format, "random:z");
+ assert (err < 0);
+ assert (DLOG_WARN == filter_pri_for_tag(p_format, "random"));
+ assert(log_should_print_line(p_format, tag, DLOG_DEBUG) == 0);
+
+ // Issue #550946
+ err = log_add_filter_string(p_format, " ");
+ assert(err == 0);
+ assert(DLOG_WARN == filter_pri_for_tag(p_format, "random"));
+
+ // note trailing space
+ err = log_add_filter_string(p_format, "*:s random:d ");
+ assert(err == 0);
+ assert(DLOG_DEBUG == filter_pri_for_tag(p_format, "random"));
+
+ err = log_add_filter_string(p_format, "*:s random:z");
+ assert(err < 0);
+
+ log_format_free(p_format);
+
+
+#if 0
+ char *ret;
+ char defaultBuffer[512];
+
+ ret = log_formatLogLine(p_format,
+ defaultBuffer, sizeof(defaultBuffer), 0, DLOG_ERROR, 123,
+ 123, 123, "random", "nofile", strlen("Hello"), "Hello", NULL);
+#endif
+
+
+ fprintf(stderr, "tests complete\n");
+#endif
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2005-2008, The Android Open Source Project
+ * Copyright (c) 2009-2013, Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <stdarg.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <time.h>
+#include <sys/time.h>
+#include <ctype.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/stat.h>
+#include <arpa/inet.h>
+
+
+#include <logger.h>
+#include <logprint.h>
+
+#define DEFAULT_LOG_ROTATE_SIZE_KBYTES 16
+#define DEFAULT_MAX_ROTATED_LOGS 4
+
+#define LOG_FILE_DIR "/dev/log_"
+
+static log_format* g_logformat;
+static bool g_nonblock = false;
+static int g_tail_lines = 0;
+
+static const char * g_output_filename = NULL;
+static int g_log_rotate_size_kbytes = 0; // 0 means "no log rotation"
+static int g_max_rotated_logs = DEFAULT_MAX_ROTATED_LOGS; // 0 means "unbounded"
+static int g_outfd = -1;
+static off_t g_out_byte_count = 0;
+static int g_dev_count = 0;
+
+struct queued_entry_t {
+ union {
+ unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1] __attribute__((aligned(4)));
+ struct logger_entry entry __attribute__((aligned(4)));
+ };
+ struct queued_entry_t* next;
+};
+
+static int cmp(struct queued_entry_t* a, struct queued_entry_t* b)
+{
+ int n = a->entry.sec - b->entry.sec;
+ if (n != 0)
+ {
+ return n;
+ }
+ return a->entry.nsec - b->entry.nsec;
+}
+
+
+struct log_device_t {
+ char* device;
+ int fd;
+ bool printed;
+ struct queued_entry_t* queue;
+ struct log_device_t* next;
+};
+
+static void enqueue(struct log_device_t* device, struct queued_entry_t* entry)
+{
+ if( device->queue == NULL)
+ {
+ device->queue = entry;
+ }
+ else
+ {
+ struct queued_entry_t** e = &device->queue;
+ while(*e && cmp(entry, *e) >= 0 )
+ {
+ e = &((*e)->next);
+ }
+ entry->next = *e;
+ *e = entry;
+ }
+}
+
+static int open_logfile (const char *pathname)
+{
+ return open(pathname, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+}
+
+static void rotate_logs()
+{
+ int err;
+ int i;
+ char file0[256]={0};
+ char file1[256]={0};
+
+ // Can't rotate logs if we're not outputting to a file
+ if (g_output_filename == NULL) {
+ return;
+ }
+
+ close(g_outfd);
+
+ for (i = g_max_rotated_logs ; i > 0 ; i--)
+ {
+ snprintf(file1, 255, "%s.%d", g_output_filename, i);
+
+ if (i - 1 == 0) {
+ snprintf(file0, 255, "%s", g_output_filename);
+ } else {
+ snprintf(file0, 255, "%s.%d", g_output_filename, i - 1);
+ }
+
+ err = rename (file0, file1);
+
+ if (err < 0 && errno != ENOENT) {
+ perror("while rotating log files");
+ }
+ }
+
+ g_outfd = open_logfile (g_output_filename);
+
+ if (g_outfd < 0) {
+ perror ("couldn't open output file");
+ exit(-1);
+ }
+
+ g_out_byte_count = 0;
+
+}
+
+
+static void processBuffer(struct log_device_t* dev, struct logger_entry *buf)
+{
+ int bytes_written = 0;
+ int err;
+ log_entry entry;
+ char mgs_buf[1024];
+
+ err = log_process_log_buffer(buf, &entry);
+
+ if (err < 0) {
+ goto error;
+ }
+
+ if (log_should_print_line(g_logformat, entry.tag, entry.priority)) {
+ if (false && g_dev_count > 1) {
+ // FIXME
+ mgs_buf[0] = dev->device[0];
+ mgs_buf[1] = ' ';
+ bytes_written = write(g_outfd, mgs_buf, 2);
+ if (bytes_written < 0)
+ {
+ perror("output error");
+ exit(-1);
+ }
+ }
+
+ bytes_written = log_print_log_line(g_logformat, g_outfd, &entry);
+
+ if (bytes_written < 0)
+ {
+ perror("output error");
+ exit(-1);
+ }
+ }
+
+ g_out_byte_count += bytes_written;
+
+ if (g_log_rotate_size_kbytes > 0 && (g_out_byte_count / 1024) >= g_log_rotate_size_kbytes)
+ {
+ rotate_logs();
+ }
+
+error:
+ //fprintf (stderr, "Error processing record\n");
+ return;
+}
+
+static void chooseFirst(struct log_device_t* dev, struct log_device_t** firstdev)
+{
+ for (*firstdev = NULL; dev != NULL; dev = dev->next) {
+ if (dev->queue != NULL && (*firstdev == NULL || cmp(dev->queue, (*firstdev)->queue) < 0))
+ {
+ *firstdev = dev;
+ }
+ }
+}
+
+static void maybePrintStart(struct log_device_t* dev) {
+ if (!dev->printed) {
+ dev->printed = true;
+ if (g_dev_count > 1 ) {
+ char buf[1024];
+ snprintf(buf, sizeof(buf), "--------- beginning of %s\n", dev->device);
+ if (write(g_outfd, buf, strlen(buf)) < 0) {
+ perror("output error");
+ exit(-1);
+ }
+ }
+ }
+}
+
+static void skipNextEntry(struct log_device_t* dev) {
+ maybePrintStart(dev);
+ struct queued_entry_t* entry = dev->queue;
+ dev->queue = entry->next;
+ free(entry);
+}
+
+static void printNextEntry(struct log_device_t* dev)
+{
+ maybePrintStart(dev);
+ processBuffer(dev, &dev->queue->entry);
+ skipNextEntry(dev);
+}
+
+
+static void read_log_lines(struct log_device_t* devices)
+{
+ struct log_device_t* dev;
+ int max = 0;
+ int ret;
+ int queued_lines = 0;
+ bool sleep = false; // for exit immediately when log buffer is empty and g_nonblock value is true.
+
+ int result;
+ fd_set readset;
+
+ for (dev=devices; dev; dev = dev->next) {
+ if (dev->fd > max) {
+ max = dev->fd;
+ }
+ }
+
+ while (1) {
+ do {
+ struct timeval timeout = { 0, 5000 /* 5ms */ }; // If we oversleep it's ok, i.e. ignore EINTR.
+ FD_ZERO(&readset);
+ for (dev=devices; dev; dev = dev->next) {
+ FD_SET(dev->fd, &readset);
+ }
+ result = select(max + 1, &readset, NULL, NULL, sleep ? NULL : &timeout);
+ } while (result == -1 && errno == EINTR);
+
+ if (result >= 0) {
+ for (dev=devices; dev; dev = dev->next) {
+ if (FD_ISSET(dev->fd, &readset)) {
+ struct queued_entry_t* entry = (struct queued_entry_t *)malloc(sizeof( struct queued_entry_t));
+ if (entry == NULL) {
+ fprintf(stderr,"Can't malloc queued_entry\n");
+ exit(-1);
+ }
+ entry->next = NULL;
+
+ /* NOTE: driver guarantees we read exactly one full entry */
+ ret = read(dev->fd, entry->buf, LOGGER_ENTRY_MAX_LEN);
+ if (ret < 0) {
+ if (errno == EINTR) {
+ free(entry);
+ goto next;
+ }
+ if (errno == EAGAIN) {
+ free(entry);
+ break;
+ }
+ perror("dlogutil read");
+ exit(EXIT_FAILURE);
+ }
+ else if (!ret) {
+ free(entry);
+ fprintf(stderr, "read: Unexpected EOF!\n");
+ exit(EXIT_FAILURE);
+ }
+ else if (entry->entry.len != ret - sizeof(struct logger_entry)) {
+ free(entry);
+ fprintf(stderr, "read: unexpected length. Expected %d, got %d\n",
+ entry->entry.len, ret - sizeof(struct logger_entry));
+ exit(EXIT_FAILURE);
+ }
+ entry->entry.msg[entry->entry.len] = '\0';
+
+ enqueue(dev, entry);
+ ++queued_lines;
+ }
+ }
+
+ if (result == 0) {
+ // we did our short timeout trick and there's nothing new
+ // print everything we have and wait for more data
+ sleep = true;
+ while (true) {
+ chooseFirst(devices, &dev);
+ if (dev == NULL) {
+ break;
+ }
+ if (g_tail_lines == 0 || queued_lines <= g_tail_lines) {
+ printNextEntry(dev);
+ } else {
+ skipNextEntry(dev);
+ }
+ --queued_lines;
+ }
+
+ // the caller requested to just dump the log and exit
+ if (g_nonblock) {
+ exit(0);
+ }
+ } else {
+ // print all that aren't the last in their list
+ sleep = false;
+ while (g_tail_lines == 0 || queued_lines > g_tail_lines) {
+ chooseFirst(devices, &dev);
+ if (dev == NULL || dev->queue->next == NULL) {
+ break;
+ }
+ if (g_tail_lines == 0) {
+ printNextEntry(dev);
+ } else {
+ skipNextEntry(dev);
+ }
+ --queued_lines;
+ }
+ }
+ }
+next:
+ ;
+ }
+}
+
+
+static int clear_log(int logfd)
+{
+ return ioctl(logfd, LOGGER_FLUSH_LOG);
+}
+
+/* returns the total size of the log's ring buffer */
+static int get_log_size(int logfd)
+{
+ return ioctl(logfd, LOGGER_GET_LOG_BUF_SIZE);
+}
+
+/* returns the readable size of the log's ring buffer (that is, amount of the log consumed) */
+static int get_log_readable_size(int logfd)
+{
+ return ioctl(logfd, LOGGER_GET_LOG_LEN);
+}
+
+static void setup_output()
+{
+
+ if (g_output_filename == NULL) {
+ g_outfd = STDOUT_FILENO;
+
+ } else {
+ struct stat statbuf;
+
+ g_outfd = open_logfile (g_output_filename);
+
+ if (g_outfd < 0) {
+ perror ("couldn't open output file");
+ exit(-1);
+ }
+ if (fstat(g_outfd, &statbuf) == -1)
+ g_out_byte_count = 0;
+ else
+ g_out_byte_count = statbuf.st_size;
+ }
+}
+
+static int set_log_format(const char * formatString)
+{
+ static log_print_format format;
+
+ format = log_format_from_string(formatString);
+
+ if (format == FORMAT_OFF) {
+ // FORMAT_OFF means invalid string
+ return -1;
+ }
+
+ log_set_print_format(g_logformat, format);
+
+ return 0;
+}
+
+static void show_help(const char *cmd)
+{
+ fprintf(stderr,"Usage: %s [options] [filterspecs]\n", cmd);
+
+ fprintf(stderr, "options include:\n"
+ " -s Set default filter to silent.\n"
+ " Like specifying filterspec '*:s'\n"
+ " -f <filename> Log to file. Default to stdout\n"
+ " -r [<kbytes>] Rotate log every kbytes. (16 if unspecified). Requires -f\n"
+ " -n <count> Sets max number of rotated logs to <count>, default 4\n"
+ " -v <format> Sets the log print format, where <format> is one of:\n\n"
+ " brief(by default) process tag thread raw time threadtime long\n\n"
+ " -c clear (flush) the entire log and exit, conflicts with '-g'\n"
+ " -d dump the log and then exit (don't block)\n"
+ " -t <count> print only the most recent <count> lines (implies -d)\n"
+ " -g get the size of the log's ring buffer and exit, conflicts with '-c'\n"
+ " -b <buffer> request alternate ring buffer\n"
+ " ('main' (default), 'radio', 'system')");
+
+
+ fprintf(stderr,"\nfilterspecs are a series of \n"
+ " <tag>[:priority]\n\n"
+ "where <tag> is a log component tag (or * for all) and priority is:\n"
+ " V Verbose\n"
+ " D Debug\n"
+ " I Info\n"
+ " W Warn\n"
+ " E Error\n"
+ " F Fatal\n"
+ " S Silent (supress all output)\n"
+ "\n'*' means '*:D' and <tag> by itself means <tag>:V\n"
+ "If no filterspec is found, filter defaults to '*:I'\n\n");
+}
+
+
+/*
+ * free one log_device_t and it doesn't take care of chain so it
+ * may break the chain list
+ */
+static void log_devices_free(struct log_device_t *dev)
+{
+ if (!dev)
+ return;
+
+ if (dev->device)
+ free(dev->device);
+
+ if (dev->queue) {
+ while (dev->queue->next) {
+ struct queued_entry_t *tmp = dev->queue->next;
+ dev->queue->next = tmp->next;
+ free(tmp);
+ }
+ free(dev->queue);
+ }
+
+ free(dev);
+ dev = NULL;
+}
+
+
+/*
+ * free all the nodes after the "dev" and includes itself
+ */
+static void log_devices_chain_free(struct log_device_t *dev)
+{
+ if (!dev)
+ return;
+
+ while (dev->next) {
+ struct log_device_t *tmp = dev->next;
+ dev->next = tmp->next;
+ log_devices_free(tmp);
+ }
+
+ log_devices_free(dev);
+ dev = NULL;
+}
+
+
+/*
+ * create a new log_device_t instance but don't care about
+ * the device node accessable or not
+ */
+static struct log_device_t *log_devices_new(const char *path)
+{
+ struct log_device_t *new;
+
+ if (!path || strlen(path) <= 0)
+ return NULL;
+
+ new = malloc(sizeof(*new));
+ if (!new) {
+ fprintf(stderr, "out of memory\n");
+ return NULL;
+ }
+
+ new->device = strdup(path);
+ new->fd = -1;
+ new->printed = false;
+ new->queue = NULL;
+ new->next = NULL;
+
+ return new;
+}
+
+
+/*
+ * add a new device to the tail of chain
+ */
+static int log_devices_add_to_tail(struct log_device_t *devices, struct log_device_t *new)
+{
+ struct log_device_t *tail = devices;
+
+ if (!devices || !new)
+ return -1;
+
+ while (tail->next)
+ tail = tail->next;
+
+ tail->next = new;
+ g_dev_count++;
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ int err;
+ int has_set_log_format = 0;
+ int is_clear_log = 0;
+ int getLogSize = 0;
+ int mode = O_RDONLY;
+ int i;
+// const char *forceFilters = NULL;
+ struct log_device_t* devices = NULL;
+ struct log_device_t* dev;
+
+ g_logformat = (log_format *)log_format_new();
+
+ if (argc == 2 && 0 == strcmp(argv[1], "--test")) {
+ logprint_run_tests();
+ exit(0);
+ }
+
+ if (argc == 2 && 0 == strcmp(argv[1], "--help")) {
+ show_help(argv[0]);
+ exit(0);
+ }
+
+ for (;;) {
+ int ret;
+
+ ret = getopt(argc, argv, "cdt:gsf:r:n:v:b:D");
+
+ if (ret < 0) {
+ break;
+ }
+
+ switch(ret) {
+ case 's':
+ // default to all silent
+ log_add_filter_rule(g_logformat, "*:s");
+ break;
+
+ case 'c':
+ is_clear_log = 1;
+ mode = O_WRONLY;
+ break;
+
+ case 'd':
+ g_nonblock = true;
+ break;
+
+ case 't':
+ g_nonblock = true;
+ g_tail_lines = atoi(optarg);
+ break;
+
+
+ case 'g':
+ getLogSize = 1;
+ break;
+
+ case 'b': {
+ char *buf;
+ if (asprintf(&buf, LOG_FILE_DIR "%s", optarg) == -1) {
+ asprintf(stderr,"Can't malloc LOG_FILE_DIR\n");
+ exit(-1);
+ }
+
+ dev = log_devices_new(buf);
+ if (dev == NULL) {
+ fprintf(stderr,"Can't add log device: %s\n", buf);
+ exit(-1);
+ }
+ if (devices) {
+ if (log_devices_add_to_tail(devices, dev)) {
+ fprintf(stderr, "Open log device %s failed\n", buf);
+ exit(-1);
+ }
+ } else {
+ devices = dev;
+ g_dev_count = 1;
+ }
+ }
+ break;
+
+ case 'f':
+ // redirect output to a file
+
+ g_output_filename = optarg;
+
+ break;
+
+ case 'r':
+// if (optarg == NULL) {
+// fprintf(stderr,"optarg == null\n");
+ // g_log_rotate_size_kbytes = DEFAULT_LOG_ROTATE_SIZE_KBYTES;
+ // } else {
+ //long logRotateSize;
+ //char *lastDigit;
+
+ if (!isdigit(optarg[0])) {
+ fprintf(stderr,"Invalid parameter to -r\n");
+ show_help(argv[0]);
+ exit(-1);
+ }
+ g_log_rotate_size_kbytes = atoi(optarg);
+ // }
+ break;
+
+ case 'n':
+ if (!isdigit(optarg[0])) {
+ fprintf(stderr,"Invalid parameter to -r\n");
+ show_help(argv[0]);
+ exit(-1);
+ }
+
+ g_max_rotated_logs = atoi(optarg);
+ break;
+
+ case 'v':
+ err = set_log_format (optarg);
+ if (err < 0) {
+ fprintf(stderr,"Invalid parameter to -v\n");
+ show_help(argv[0]);
+ exit(-1);
+ }
+
+ has_set_log_format = 1;
+ break;
+
+ default:
+ fprintf(stderr,"Unrecognized Option\n");
+ show_help(argv[0]);
+ exit(-1);
+ break;
+ }
+ }
+
+ /* get log size conflicts with write mode */
+ if (getLogSize && mode != O_RDONLY) {
+ show_help(argv[0]);
+ exit(-1);
+ }
+
+ if (!devices) {
+ devices = log_devices_new("/dev/"LOGGER_LOG_MAIN);
+ if (devices == NULL) {
+ fprintf(stderr,"Can't add log device: %s\n", LOGGER_LOG_MAIN);
+ exit(-1);
+ }
+ g_dev_count = 1;
+
+ int accessmode =
+ (mode == O_RDONLY) ? R_OK : 0
+ | (mode == O_WRONLY) ? W_OK : 0;
+
+ // only add this if it's available
+ if (0 == access("/dev/"LOGGER_LOG_SYSTEM, accessmode)) {
+ if (log_devices_add_to_tail(devices, log_devices_new("/dev/"LOGGER_LOG_SYSTEM))) {
+ fprintf(stderr,"Can't add log device: %s\n", LOGGER_LOG_SYSTEM);
+ exit(-1);
+ }
+ }
+
+ if (0 == access("/dev/"LOGGER_LOG_APPS, accessmode)) {
+ if (log_devices_add_to_tail(devices, log_devices_new("/dev/"LOGGER_LOG_APPS))) {
+ fprintf(stderr,"Can't add log device: %s\n", LOGGER_LOG_APPS);
+ exit(-1);
+ }
+ }
+/*
+ // only add this if it's available
+ int fd;
+ if ((fd = open("/dev/"LOGGER_LOG_SYSTEM, mode)) != -1) {
+ devices->next = (struct log_device_t *)malloc( sizeof(struct log_device_t));
+ devices->next->device = strdup("/dev/"LOGGER_LOG_SYSTEM);
+ devices->next->fd = -1;
+ devices->next->printed = false;
+ devices->next->queue = NULL;
+ devices->next->next = NULL;
+ g_dev_count ++;
+
+ close(fd);
+ }
+*/
+ }
+
+ if (g_log_rotate_size_kbytes != 0 && g_output_filename == NULL)
+ {
+ fprintf(stderr,"-r requires -f as well\n");
+ show_help(argv[0]);
+ exit(-1);
+ }
+
+ setup_output();
+
+
+ if (has_set_log_format == 0) {
+ err = set_log_format("brief");
+ }
+/*
+ const char* logFormat = getenv("DLOG_PRINTF_LOG");
+
+ if (logFormat != NULL) {
+ err = set_log_format("brief");
+
+ if (err < 0) {
+ fprintf(stderr, "invalid format in DLOG_PRINTF_LOG '%s'\n", logFormat);
+ }
+ }
+ }
+ if (forceFilters) {
+ err = log_add_filter_string(g_logformat, forceFilters);
+ if (err < 0) {
+ fprintf (stderr, "Invalid filter expression in -logcat option\n");
+ exit(0);
+ }
+ } else if (argc == optind) {
+ // Add from environment variable
+ char *env_tags_orig = getenv("DLOG_LOG_TAGS");
+
+ if (env_tags_orig != NULL) {
+ err = log_add_filter_string(g_logformat, env_tags_orig);
+
+ if (err < 0) {
+ fprintf(stderr, "Invalid filter expression in DLOG_LOG_TAGS\n");
+ show_help(argv[0]);
+ exit(-1);
+ }
+ }
+ } else {
+ // Add from commandline
+*/
+ fprintf(stderr,"arc = %d, optind = %d ,Kb %d, rotate %d\n", argc, optind,g_log_rotate_size_kbytes,g_max_rotated_logs);
+
+ if(argc == optind )
+ {
+ // Add from environment variable
+ //char *env_tags_orig = getenv("DLOG_TAGS");
+ log_add_filter_string(g_logformat, "*:d");
+ }
+ else
+ {
+
+ for (i = optind ; i < argc ; i++) {
+ err = log_add_filter_string(g_logformat, argv[i]);
+
+ if (err < 0) {
+ fprintf (stderr, "Invalid filter expression '%s'\n", argv[i]);
+ show_help(argv[0]);
+ exit(-1);
+ }
+ }
+ }
+/*
+ }
+*/
+ dev = devices;
+ while (dev) {
+ dev->fd = open(dev->device, mode);
+ if (dev->fd < 0) {
+ fprintf(stderr, "Unable to open log device '%s': %s\n",
+ dev->device, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+ if (is_clear_log) {
+ int ret;
+ ret = clear_log(dev->fd);
+ if (ret) {
+ perror("ioctl");
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ if (getLogSize) {
+ int size, readable;
+
+ size = get_log_size(dev->fd);
+ if (size < 0) {
+ perror("ioctl");
+ exit(EXIT_FAILURE);
+ }
+
+ readable = get_log_readable_size(dev->fd);
+ if (readable < 0) {
+ perror("ioctl");
+ exit(EXIT_FAILURE);
+ }
+
+ printf("%s: ring buffer is %dKb (%dKb consumed), "
+ "max entry is %db, max payload is %db\n", dev->device,
+ size / 1024, readable / 1024,
+ (int) LOGGER_ENTRY_MAX_LEN, (int) LOGGER_ENTRY_MAX_PAYLOAD);
+ }
+
+ dev = dev->next;
+ }
+
+ if (getLogSize) {
+ return 0;
+ }
+
+ if (is_clear_log) {
+ return 0;
+ }
+
+ read_log_lines(devices);
+
+ log_devices_chain_free(devices);
+
+ return 0;
+}
--- /dev/null
+[Unit]
+Description=Start the dlog service
+
+[Service]
+ExecStart=/usr/bin/dlogutil -r 1024 -n 3 -f /var/log/dlog -v time *:W
+
+[Install]
+WantedBy=multi-user.target
+
--- /dev/null
+[Unit]
+Description=Start the dlog service
+
+[Service]
+ExecStart=/usr/bin/dlogutil -b radio -v time -f /var/log/seq.radio.log -r 1000 -n 10
+
+[Install]
+WantedBy=multi-user.target
+
--- /dev/null
+* Thu Jan 03 2013 Anas Nashif <anas.nashif@intel.com> accepted/trunk/20121212.102709@5168da3
+- fixed build with new compilers
+- spec cleanup
+- check for archiver in configure.ac
+
+* Thu Jun 28 2012 Patrick McCarty <patrick.mccarty@linux.intel.com> - 0.4.1
+- Fix initscript symlinks
+
+* Fri Jun 22 2012 William Douglas <william.douglas@intel.com> - 0.4.1
+- Add system unit files
--- /dev/null
+Name: dlog
+Summary: Logging service
+Version: 0.4.1
+Release: 2
+Group: System/Libraries
+License: Apache License, Version 2.0
+Source0: %{name}-%{version}.tar.gz
+Source101: dlog-main.service
+Source102: dlog-radio.service
+Source103: tizen-debug-level.service
+BuildRequires: pkgconfig(libsystemd-journal)
+Requires(post): /usr/bin/vconftool
+Requires(post): coreutils
+
+%description
+dlog API library
+
+%package -n libdlog
+Summary: Logging service dlog API
+Group: Development/Libraries
+
+%description -n libdlog
+dlog API library
+
+%package -n libdlog-devel
+Summary: Logging service dlog API
+Group: Development/Libraries
+Requires: lib%{name} = %{version}-%{release}
+
+%description -n libdlog-devel
+dlog API library
+
+
+%package -n dlogutil
+Summary: print log data to the screen
+Group: Development/Libraries
+Requires: lib%{name} = %{version}-%{release}
+Requires(post): /usr/bin/systemctl
+Requires(postun): /usr/bin/systemctl
+Requires(preun): /usr/bin/systemctl
+
+%description -n dlogutil
+Utilities for print log data
+
+
+
+%prep
+%setup -q
+
+
+%build
+%autogen --disable-static
+%configure --disable-static
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/etc/
+cp %{_builddir}/%{name}-%{version}/.dloglevel %{buildroot}/opt/etc/.dloglevel
+mkdir -p %{buildroot}/etc/profile.d/
+cp %{_builddir}/%{name}-%{version}/tizen_platform_env.sh %{buildroot}/etc/profile.d/tizen_platform_env.sh
+mkdir -p %{buildroot}/usr/bin/
+cp %{_builddir}/%{name}-%{version}/dlogctrl %{buildroot}/usr/bin/dlogctrl
+
+mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/rc3.d
+mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/rc5.d
+rm -f %{buildroot}/%{_sysconfdir}/etc/rc.d/rc3.d/S05dlog
+rm -f %{buildroot}/%{_sysconfdir}/etc/rc.d/rc5.d/S05dlog
+ln -s ../init.d/dlog.sh %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/S05dlog
+ln -s ../init.d/dlog.sh %{buildroot}/%{_sysconfdir}/rc.d/rc5.d/S05dlog
+
+mkdir -p %{buildroot}%{_libdir}/systemd/system/basic.target.wants
+mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
+
+install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/
+install -m 0644 %SOURCE102 %{buildroot}%{_libdir}/systemd/system/
+install -m 0644 %SOURCE103 %{buildroot}%{_libdir}/systemd/system/
+
+ln -s ../dlog-main.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/dlog-main.service
+ln -s ../dlog-radio.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/dlog-radio.service
+ln -s ../tizen-debug-level.service %{buildroot}%{_libdir}/systemd/system/basic.target.wants/tizen-debug-level.service
+
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/etc/dlog
+
+%preun -n dlogutil
+if [ $1 == 0 ]; then
+ systemctl stop dlog-main.service
+ systemctl stop dlog-radio.service
+fi
+
+%post -n dlogutil
+systemctl daemon-reload
+if [ $1 == 1 ]; then
+ systemctl restart dlog-main.service
+ systemctl restart dlog-radio.service
+fi
+
+%postun -n dlogutil
+systemctl daemon-reload
+
+%post -n libdlog -p /sbin/ldconfig
+%postun -n libdlog -p /sbin/ldconfig
+
+%files -n dlogutil
+%manifest dlogutil.manifest
+%{_bindir}/dlogutil
+%attr(775,root,root) %{_bindir}/dlogctrl
+%{_sysconfdir}/rc.d/init.d/dlog.sh
+%{_sysconfdir}/rc.d/rc3.d/S05dlog
+%{_sysconfdir}/rc.d/rc5.d/S05dlog
+%{_libdir}/systemd/system/tizen-debug-level.service
+%{_libdir}/systemd/system/dlog-main.service
+%{_libdir}/systemd/system/dlog-radio.service
+%{_libdir}/systemd/system/basic.target.wants/tizen-debug-level.service
+%{_libdir}/systemd/system/multi-user.target.wants/dlog-main.service
+%{_libdir}/systemd/system/multi-user.target.wants/dlog-radio.service
+%attr(775,root,app) %dir /opt/etc/dlog
+
+%files -n libdlog
+/usr/share/license/%{name}
+%doc LICENSE.APLv2
+/opt/etc/.dloglevel
+/etc/profile.d/tizen_platform_env.sh
+%{_libdir}/libdlog.so.0
+%{_libdir}/libdlog.so.0.0.0
+
+%files -n libdlog-devel
+%{_includedir}/dlog/dlog.h
+%{_libdir}/pkgconfig/dlog.pc
+%{_libdir}/libdlog.so
+
--- /dev/null
+[Unit]
+Description=Set tizen debug level globally
+DefaultDependencies=no
+After=opt.mount
+Before=basic.target
+ConditionFileExists=/opt/etc/dlog/.platformloggingon
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c '/usr/bin/systemctl set-environment TIZEN_PLATFORMLOGGING_MODE=1 TIZEN_DLOG_LEVEL=$(cat /opt/etc/.dloglevel)'
+
+[Install]
+WantedBy=basic.target
+
--- /dev/null
+#!/bin/sh
+
+if [ -e "/opt/etc/dlog/.platformloggingmode" ]; then
+ export TIZEN_PLATFORMLOGGING_MODE=1
+fi
+
+# I'm not clear why "-a" doesn't work here
+if [ "x$TIZEN_PLATFORMLOGGING_MODE" != "x" ] &&
+ [ "$TIZEN_PLATFORMLOGGING_MODE" -eq "1" ]; then
+ dlevel=$(cat /opt/etc/.dloglevel)
+ if [ "$dlevel" -eq "0" ]; then
+ export TIZEN_DLOG_LEVEL=0
+ elif [ "$dlevel" -eq "1" ]; then
+ export TIZEN_DLOG_LEVEL=1
+ elif [ "$dlevel" -eq "2" ]; then
+ export TIZEN_DLOG_LEVEL=2
+ elif [ "$dlevel" -eq "3" ]; then
+ export TIZEN_DLOG_LEVEL=3
+ elif [ "$dlevel" -eq "4" ]; then
+ export TIZEN_DLOG_LEVEL=4
+ elif [ "$dlevel" -eq "5" ]; then
+ export TIZEN_DLOG_LEVEL=5
+ elif [ "$dlevel" -eq "6" ]; then
+ export TIZEN_DLOG_LEVEL=6
+ elif [ "$dlevel" -eq "7" ]; then
+ export TIZEN_DLOG_LEVEL=7
+ elif [ "$dlevel" -eq "8" ]; then
+ export TIZEN_DLOG_LEVEL=8
+ else
+ export TIZEN_DLOG_LEVEL=8
+ fi
+fi