2 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #include "launchpad_log.h"
22 #include "launchpad_logger.h"
23 #include "log_private.h"
25 #define PATH_LAUNCHPAD_LOG "/var/log/appfw/launchpad/launchpad.log"
27 static logger_h __logger;
29 int _log_print(const char *tag, const char *format, ...)
31 char formatted_buf[LAUNCHPAD_LOG_MAX_STRING_SIZE];
38 vsnprintf(formatted_buf, sizeof(formatted_buf), format, ap);
41 return _logger_print(__logger, tag, formatted_buf);
50 ret = _logger_create(PATH_LAUNCHPAD_LOG, &__logger);
52 _E("Failed to create log file. error(%d)", ret);
64 _logger_destroy(__logger);