1 | // Copyright (c) 2017-2023, The Khronos Group Inc. |
2 | // Copyright (c) 2017-2019 Valve Corporation |
3 | // Copyright (c) 2017-2019 LunarG, Inc. |
4 | // |
5 | // SPDX-License-Identifier: Apache-2.0 OR MIT |
6 | // |
7 | // Initial Author: Ryan Pavlik <ryan.pavlik@collabora.com> |
8 | // |
9 | |
10 | #pragma once |
11 | |
12 | #include "loader_logger.hpp" |
13 | |
14 | #include <openxr/openxr.h> |
15 | |
16 | #include <memory> |
17 | |
18 | //! Standard Error logger, on by default. Disabled with environment variable XR_LOADER_DEBUG = "none". |
19 | std::unique_ptr<LoaderLogRecorder> MakeStdErrLoaderLogRecorder(void* user_data); |
20 | |
21 | //! Standard Output logger used with XR_LOADER_DEBUG environment variable. |
22 | std::unique_ptr<LoaderLogRecorder> MakeStdOutLoaderLogRecorder(void* user_data, XrLoaderLogMessageSeverityFlags flags); |
23 | |
24 | #ifdef __ANDROID__ |
25 | //! Android liblog ("logcat") logger |
26 | std::unique_ptr<LoaderLogRecorder> MakeLogcatLoaderLogRecorder(); |
27 | #endif |
28 | |
29 | // Debug Utils logger used with XR_EXT_debug_utils |
30 | std::unique_ptr<LoaderLogRecorder> MakeDebugUtilsLoaderLogRecorder(const XrDebugUtilsMessengerCreateInfoEXT* create_info, |
31 | XrDebugUtilsMessengerEXT debug_messenger); |
32 | |
33 | #ifdef _WIN32 |
34 | //! Win32 debugger output |
35 | std::unique_ptr<LoaderLogRecorder> MakeDebuggerLoaderLogRecorder(void* user_data); |
36 | #endif |
37 | |
38 | // TODO: Add other Derived classes: |
39 | // - FileLoaderLogRecorder - During/after xrCreateInstance |
40 | // - PipeLoaderLogRecorder? - During/after xrCreateInstance |
41 | |