blob: 4c14c6053a5dd291f07a78d3f4afdecd3dbe4c1b [file] [log] [blame]
David Hu1a74bc52021-08-19 11:17:42 +08001/*
Jackson Cooper-Drivere7c8f8e2025-03-04 10:28:59 +00002 * SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
David Hu1a74bc52021-08-19 11:17:42 +08003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __TEST_LOG_H__
9#define __TEST_LOG_H__
10
Raef Coles4817eb82022-01-18 12:33:24 +000011#ifdef USE_SP_LOG
Jackson Cooper-Drivere7c8f8e2025-03-04 10:28:59 +000012#include "tfm_log_unpriv.h"
Kevin Peng33f4f7d2023-11-15 17:35:48 +080013#elif defined USE_STDIO
14#include <stdio.h>
Raef Coles4817eb82022-01-18 12:33:24 +000015#else
16#include "tfm_log_raw.h"
17#endif /* USE_SP_LOG */
David Hu1a74bc52021-08-19 11:17:42 +080018
19#ifdef __cplusplus
20extern "C" {
21#endif
22
Jackson Cooper-Drivere7c8f8e2025-03-04 10:28:59 +000023#if defined USE_SP_LOG
24#define TEST_LOG(...) tfm_log_unpriv(LOG_MARKER_RAW __VA_ARGS__)
25#elif defined USE_STDIO
Ken Liua3d6be42022-09-29 11:12:20 +080026#define TEST_LOG(...) printf(__VA_ARGS__)
Raef Coles4817eb82022-01-18 12:33:24 +000027#else
28#define TEST_LOG(...) tfm_log_printf(__VA_ARGS__)
29#endif /* USE_SP_LOG */
David Hu1a74bc52021-08-19 11:17:42 +080030
31#ifdef __cplusplus
32}
33#endif
34
35#endif /* __TEST_LOG_H__ */