${TEE_STUB_PATH}/TaskStrategy/TaskStrategy.cpp
${TEE_STUB_PATH}/TEEStubServer/ConnectionSession.cpp
${TEE_STUB_PATH}/TEEStubServer/TEEStubServer.cpp
- ${TEE_STUB_PATH}/TEEStubServer/TADebug.cpp
)
SET(TEE_STUB_HEADERS
* Include files\r
*-----------------------------------------------------------------------------*/\r
#include "tee_internal_api.h"\r
-#include <debug.h>\r
#include <PropertyAccess/Property.h>\r
#include <string>\r
#include <sstream>\r
#include <iostream>\r
#include <config.h>\r
#include <string.h>\r
-#include <debug.h>\r
#include <permission.h>\r
+#include "log.h"\r
\r
using namespace rapidxml;\r
\r
#include <PropertyAccess/rapidxml/rapidxml.hpp>\r
#include <iostream>\r
#include <config.h>\r
+#include "log.h"\r
\r
using namespace rapidxml;\r
\r
* Include files\r
*-----------------------------------------------------------------------------*/\r
#include <PropertyAccess/Property.h>\r
-#include <debug.h>\r
#include <map>\r
\r
/*-----------------------------------------------------------------------------\r
*-----------------------------------------------------------------------------*/
#include "tee_sim_command.h"
#include "tee_internal_api.h"
-#include <debug.h>
#include "boost/shared_ptr.hpp"
#include <string>
#include <string.h>
*-----------------------------------------------------------------------------*/
#include "CommandCloseSession.h"
#include <sstream>
+#include "log.h"
/*-----------------------------------------------------------------------------
* Member functions
*-----------------------------------------------------------------------------*/
#include "CommandCreateEntryPoint.h"
#include <sstream>
+#include "log.h"
/*-----------------------------------------------------------------------------
* Member functions
*-----------------------------------------------------------------------------*/
#include "CommandDestroyEntryPoint.h"
#include <sstream>
+#include "log.h"
/*-----------------------------------------------------------------------------
* Member functions
#include <stdio.h>
#include <sys/shm.h>
#include <iostream>
+#include "log.h"
using namespace std;
/*-----------------------------------------------------------------------------
#include "SharedMemoryMap.h"
#include <stdio.h>
#include <sstream>
+#include "log.h"
using namespace std;
*-----------------------------------------------------------------------------*/
#include "SharedMemoryMap.h"
-#include <debug.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <time.h>
#include <unistd.h>
+#include "log.h"
using namespace std;
#include "TaskStrategy/TaskQueuedStrategy.h"
#include "TACommands/MakeCommand.h"
#include <iostream>
+#include "log.h"
using namespace std;
+++ /dev/null
-/**
- * Copyright (c) 2015-2017 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.
- */
-
-/**
- * @file
- * @author JungKyuen Lee (jklolo.lee@samsung.com)
- * @brief TA debug function
- */
-
-
-/*-----------------------------------------------------------------------------
- * Include files
- *-----------------------------------------------------------------------------*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <log_level.h>
-#include <dlog/dlog.h>
-#include <stdarg.h>
-#include <string.h>
-
-#define LOG_LABEL_SIZE 64
-#define LOG_BUFFER_SIZE 4096
-
-static int level = TA_LOG_LEVEL;
-static char log_label[LOG_LABEL_SIZE];
-static char log_one_buffer[LOG_BUFFER_SIZE];
-
-extern "C" void setDebugLogName(const char* __name);
-extern "C" int __logger_log(const char* tag, const usr_log_level lv,
- const char* fmt, const char* function,
- const int line, ...)
-{
- va_list args;
- int len = 0;
-
- if(fmt == NULL || function == NULL)
- return 0;
-
- if(tag != NULL && strlen(log_label) == 0)
- setDebugLogName(tag);
-
- if(level >= lv && level != LOG_SILENT) {
- log_priority dlog_level = DLOG_DEBUG;
- switch(lv)
- {
- case LOG_DEBUG:
- dlog_level = DLOG_DEBUG;
- break;
- case LOG_INFO:
- case LOG_NOTICE:
- dlog_level = DLOG_INFO;
- break;
- case LOG_WARNING:
- dlog_level = DLOG_WARN;
- break;
- case LOG_ERR:
- case LOG_CRIT:
- case LOG_ALERT:
- case LOG_EMERG:
- dlog_level = DLOG_ERROR;
- break;
- default:
- break;
- }
-
- va_start(args, line);
- len = vsnprintf(log_one_buffer, sizeof(log_one_buffer), fmt, args);
- va_end(args);
- len += strlen(log_label);
- dlog_print(dlog_level, log_label, "%s\n", log_one_buffer);
- printf("[%s] %s %d : %s\n",
- log_label, function, line, log_one_buffer);
- }
- return len;
-}
-
-extern "C" void initDebugLogLevel(const char* fmt, ...)
-{
- va_list args;
- va_start(args, fmt);
- __logger_log("Level", LOG_DEBUG, fmt, __FILE__, __LINE__, args);
- va_end(args);
-}
-
-extern "C" void setDebugLogLevelNum(const usr_log_level __level)
-{
- level = __level;
-}
-
-extern "C" int getDebugLogLevelNum(void)
-{
- return level;
-}
-
-extern "C" void setDebugLogLevel(const char* __level)
-{
- if(__level != NULL)
- level = atoi(__level);
-}
-
-extern "C" void setDebugLogName(const char* __name)
-{
- if(__name == NULL)
- return;
-
- strncpy(log_label, __name, sizeof(log_label)-1);
- log_label[sizeof(log_label)-1] = 0;
-}
-
-extern "C" void getDebugLogName(char* __name)
-{
- if(__name != NULL)
- {
- int length = strlen(log_label);
- strncpy(__name, log_label, length);
- __name[length] = '\0';
- }
-}
-
* Include files
*-----------------------------------------------------------------------------*/
#include "TEEStubServer.h"
+#include "log.h"
/*-----------------------------------------------------------------------------
* Member functions
#include "ssf_lib.h"
#include <string>
#include <boost/date_time/posix_time/posix_time.hpp>
+#include "log.h"
/*-----------------------------------------------------------------------------
* Member functions
#include "TEEStubServer/TEEStubServer.h"
#include <PropertyAccess/PropertyApi.h>
#include <PropertyAccess/PropertyUtility.h>
+#include "log.h"
/*-----------------------------------------------------------------------------
* Globals
TEE_Result initStatus;
char uuid[100];
int uuidlen = strlen(argv[0]);
- printf("TEESTUB argv[0]: %s\n", argv[0]);
- printf("TEESTUB argv[1]: %s\n", argv[1]);
+ LOGI(TEE_STUB, "argv[0]: %s\n", argv[0]);
+ LOGI(TEE_STUB, "argv[1]: %s\n", argv[1]);
// fetch uuid from argv[0]
int i, j;
for (i = uuidlen - 38, j = 0; i < uuidlen - 6; j++, i++) {
+++ /dev/null
-/**
- * Copyright (c) 2011-2017 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.
- */
-
-/**
- * @file
- * @author Jaemin Ryu (jm77.ryu@samsung.com)
- */
-
-#ifndef __ALLOC_DEBUG_H__
-#define __ALLOC_DEBUG_H__
-
-#include <log_level.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define TEE_STUB "TEE_STUB"
-#define LOG_LABEL_SIZE 64
-
-int __logger_log(const char* tag, const usr_log_level lv, const char* fmt, const char* function, const int line, ...);
-
-#define LOGD(Tag, Fmt, ...) __logger_log(Tag, LOG_DEBUG, Fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)
-#define LOGI(Tag, Fmt, ...) __logger_log(Tag, LOG_INFO, Fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)
-#define LOGW(Tag, Fmt, ...) __logger_log(Tag, LOG_WARNING, Fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)
-#define LOGE(Tag, Fmt, ...) __logger_log(Tag, LOG_ERR, Fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)
-#define LOGC(Tag, Fmt, ...) __logger_log(Tag, LOG_CRIT, Fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__)
-
-void setDebugLogLevelNum(const usr_log_level __level);
-int getDebugLogLevelNum(void);
-void setDebugLogLevel(const char* __level);
-void setDebugLogName(const char* __name); /* buffer(__name) size should be LOG_LABEL_SIZE(64) */
-void getDebugLogName(char* __name); /* buffer(__name) size should be LOG_LABEL_SIZE(64) */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ALLOC_DEBUG_H */