From: Ravi Nanjundappa Date: Tue, 13 Oct 2015 05:52:07 +0000 (+0530) Subject: Removing unwanted files X-Git-Tag: 1.2.0+RC1~868 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f2a7183304e116c167b389a3e4a8a7a263d92fb;p=platform%2Fupstream%2Fiotivity.git Removing unwanted files Removing unwanted files related to logging from resource dir Change-Id: Ia550d754347f1dc45d00e43b9f95f2aa9f8cff1f Signed-off-by: Ravi Nanjundappa Reviewed-on: https://gerrit.iotivity.org/gerrit/3839 Tested-by: jenkins-iotivity Reviewed-by: Ossama Othman Reviewed-by: Jon A. Cruz --- diff --git a/resource/oc_logger/samples/linux/README b/resource/oc_logger/samples/linux/README deleted file mode 100644 index aa8683e..0000000 --- a/resource/oc_logger/samples/linux/README +++ /dev/null @@ -1,44 +0,0 @@ -------------------------------------------------------------------------------- - NOTICE - Transition to SCONS -------------------------------------------------------------------------------- - -The IoTivity build system is transitioning to SCONS. Although the -makefiles are still available (until v1.0) and some developers are -still using them, they are currently no longer supported. To learn more -about building using SCONS see Readme.scons.txt in the repository root -directory. The build steps used in continuous integration can be found -in auto_build.sh which is also in the the repository root directory. - -------------------------------------------------------------------------------- - -To run the oc_logger C sample app, first build liboctbstack.a - -cd /csdk - -To enable logging -make BUILD=debug -else -make BUILD=release - -Next, build the oc_logger C sample app - -cd /oc_logger/samples/linux - -To enable logging -make BUILD=debug -else -make BUILD=release - -The logger sample has two options, default logging or -a custom logger that can be supplied by the user application - -To run the application with the default logger, run - -./debug/test_logging -c 0 - -To run the application using a built in custom console logger, run - -./debug/test_logging -c 1 - - - diff --git a/resource/oc_logger/samples/linux/test_logging.c b/resource/oc_logger/samples/linux/test_logging.c deleted file mode 100644 index 533a59a..0000000 --- a/resource/oc_logger/samples/linux/test_logging.c +++ /dev/null @@ -1,80 +0,0 @@ -//****************************************************************** -// -// Copyright 2014 Intel Mobile Communications GmbH 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 "logger.h" -#include -#include -#include -#include - -#define TAG ("MAIN") - -static int customLogger = 0; - -static void PrintUsage() -{ - OC_LOG(INFO, TAG, "Usage : test_logging -c <0|1>"); - OC_LOG(INFO, TAG, "-u <0|1> : 0 - default logging, 1 - custom console logging"); -} - -int main(int argc, char* argv[]) -{ - int opt; - - while ((opt = getopt(argc, argv, "c:")) != -1) - { - switch(opt) - { - case 'c': - customLogger = atoi(optarg); - break; - default: - PrintUsage(); - return -1; - } - } - - if (customLogger == 0) - { - // Default logger - OC_LOG(DEBUG, TAG, "This is a DEBUG"); - OC_LOG(INFO, TAG, "This is a INFO"); - OC_LOG(WARNING, TAG, "This is a WARNING"); - OC_LOG(ERROR, TAG, "This is a ERROR"); - OC_LOG(FATAL, TAG, "This is a FATAL"); - } - else - { - // Custom logger, in this case, the console logger - oc_log_ctx_t *log = oc_make_console_logger(); - - OC_LOG_CONFIG(log); - - OC_LOG(DEBUG, TAG, "This is a DEBUG"); - OC_LOG(INFO, TAG, "This is a INFO"); - OC_LOG(WARNING, TAG, "This is a WARNING"); - OC_LOG(ERROR, TAG, "This is a ERROR"); - OC_LOG(FATAL, TAG, "This is a FATAL"); - OC_LOG_SHUTDOWN(); - } - - - return 0; -}