If the logger initialization is failed, printing log will be skipped.
Change-Id: I2e94fb628ed6cc2b42312e9d83bcbfebd5c24c3a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
{
char formatted_buf[LAUNCHPAD_LOG_MAX_STRING_SIZE];
va_list ap;
- int ret;
- if (!__logger) {
- ret = _logger_create(PATH_LAUNCHPAD_LOG, &__logger);
- if (ret != 0) {
- _E("Failed to create log file. error(%d)", ret);
- return -1;
- }
- }
+ if (!__logger)
+ return 0;
va_start(ap, format);
vsnprintf(formatted_buf, sizeof(formatted_buf), format, ap);