/*
 * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * PROPRIETARY/CONFIDENTIAL
 *
 * This software is the confidential and proprietary information of Samsung
 * Electronics Co., Ltd. ("Confidential Information"). You shall not disclose such
 * Confidential Information and shall use it only in accordance with the terms of
 * the license agreement you entered into with Samsung Electronics Co., Ltd. ("SAMSUNG")
 * SAMSUNG MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
 * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
 * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SAMSUNG SHALL NOT BE
 * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
 * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 */

#ifndef _DSMSTA_KLOG_H_
#define _DSMSTA_KLOG_H_

#include <stdarg.h>

void klog_set_level(int level);
void klog_write(int level, const char *fmt, ...)
		__attribute__ ((format (printf, 2, 3)));

#define ERROR_LEVEL   3
#define WARNING_LEVEL 4
#define NOTICE_LEVEL  5
#define INFO_LEVEL    6
#define DEBUG_LEVEL   7

#define KLOG_ERROR(tag, fmt, ...) \
		klog_write(ERROR_LEVEL, tag ": " fmt, ##__VA_ARGS__)

#define KLOG_WARNING(tag, fmt, ...) \
		klog_write(WARNING_LEVEL, tag ": " fmt, ##__VA_ARGS__)

#define KLOG_NOTICE(tag, fmt, ...) \
		klog_write(NOTICE_LEVEL, tag ": " fmt, ##__VA_ARGS__)

#define KLOG_INFO(tag, fmt, ...) \
		klog_write(INFO_LEVEL, tag ": " fmt, ##__VA_ARGS__)

#define KLOG_DEBUG(tag, fmt, ...) \
		klog_write(DEBUG_LEVEL, tag ": " fmt, ##__VA_ARGS__)

#endif /* _DSMSTA_KLOG_H_ */
