summaryrefslogtreecommitdiff
path: root/common/src/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/debug.c')
-rwxr-xr-xcommon/src/debug.c57
1 files changed, 25 insertions, 32 deletions
diff --git a/common/src/debug.c b/common/src/debug.c
index 800d69a..2dc7e7c 100755
--- a/common/src/debug.c
+++ b/common/src/debug.c
@@ -1,19 +1,18 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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 <stdarg.h>
@@ -102,30 +101,16 @@ static unsigned long get_sys_elapsed_time(void)
return ((current_time.tv_sec * 1E3 + current_time.tv_usec / 1E3) - (init_time.tv_sec * 1E3 + init_time.tv_usec / 1E3));
}
-char *get_fmt_string__inline (const char *msg, va_list va)
-{
-#define MAX_CHAR_PER_LINE ( 1024 )
-
- static char szPrint[MAX_CHAR_PER_LINE];
-
- vsnprintf(szPrint, 1024, msg, va);
-
- return szPrint;
-}
-
-
void _custom_debug_init()
{
get_sys_elapsed_time();
}
-
void _custom_debug_deinit()
{
}
-
void
_custom_err_trace_write( const char *func_name, int line_num, const char *fmt, ... )
{
@@ -240,7 +225,7 @@ DBG_MSG_CUST13 = 14,
-void _custom_debug_msg(debug_msg_type *debug_msg, const char *msg, ...)
+void __custom_debug_msg(debug_msg_type *debug_msg, const char *msg, ...)
{
va_list va;
@@ -270,7 +255,7 @@ void _custom_debug_msg(debug_msg_type *debug_msg, const char *msg, ...)
if ( _DEBUG_OUTPUT_DIRECTION & _DEBUG_OUTPUT_DIRECTION_CONSOLE )
{
- printf(_DEBUG_PREFIX"%s[F:%-16.16s L:%5d][%s:%s] ",time_string , pFileName, debug_msg->nline , debug_msg->szcategory, level );
+ printf(_DEBUG_PREFIX"%s[F:%-16.16s L:%5d][%s:%s] ", time_string , pFileName, debug_msg->nline , debug_msg->szcategory, level );
vprintf(msg, va);
printf("\n");
}
@@ -291,6 +276,14 @@ void _custom_debug_msg(debug_msg_type *debug_msg, const char *msg, ...)
// vprint_log(prio,_DEBUG_MODULE, msg, va);
}
+#if 0
+ if ( _DEBUG_OUTPUT_DIRECTION & _DEBUG_OUTPUT_DIRECTION_FILE )
+ {
+ fprintf(_DEBUG_PREFIX"%s[F:%-16.16s L:%5d][%s:%s] ",time_string , pFileName, debug_msg->nline , szCategory[debug_msg->category], level );
+ vprintf(msg, va);
+ fprintf("\n");
+ }
+#endif
va_end(va);
if ( G_UNLIKELY(debug_msg->msg_level == DBG_MSG_FATAL) )