carb/logging/StandardLogger.h

File members: carb/logging/StandardLogger.h

// Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//

#pragma once

#include "Logger.h"
#include "StandardLogger2.h"

namespace carb
{
namespace logging
{

#if CARB_PLATFORM_WINDOWS && !defined(DOXYGEN_BUILD) && CARB_VERSION_ATLEAST(carb_logging_ILogging, 1, 1)
struct CARB_DEPRECATED("Use StandardLogger2 instead") StandardLogger : public Logger
#else // Linux is very warning-heavy about [[deprecated]]
struct StandardLogger : public Logger
#endif
{
    void(CARB_ABI* setFilenameIncluded)(StandardLogger* instance, bool included);

    void(CARB_ABI* setLineNumberIncluded)(StandardLogger* instance, bool included);

    void(CARB_ABI* setFunctionNameIncluded)(StandardLogger* instance, bool included);

    void(CARB_ABI* setTimestampIncluded)(StandardLogger* instance, bool included);

    void(CARB_ABI* setThreadIdIncluded)(StandardLogger* instance, bool included);

    void(CARB_ABI* setSourceIncluded)(StandardLogger* instance, bool included);

    void(CARB_ABI* setStandardStreamOutput)(StandardLogger* instance, bool enabled);

    void(CARB_ABI* setDebugConsoleOutput)(StandardLogger* instance, bool enabled);

    void(CARB_ABI* setFileOutput)(StandardLogger* instance, const char* filePath);

    void(CARB_ABI* setFileOuputFlushLevel)(StandardLogger* instance, int32_t level);

    void(CARB_ABI* setFlushStandardStreamOutput)(StandardLogger* instance, bool enabled);

    void(CARB_ABI* setElapsedTimeUnits)(StandardLogger* instance, const char* units);

    void(CARB_ABI* setProcessIdIncluded)(StandardLogger* instance, bool enabled);

    void(CARB_ABI* setMultiProcessGroupId)(StandardLogger* instance, int32_t id);

    void(CARB_ABI* setColorOutputIncluded)(StandardLogger* instance, bool enabled);

    void(CARB_ABI* setOutputStream)(StandardLogger* instance, OutputStream outputStream);

    void(CARB_ABI* setStandardStreamOutputLevelThreshold)(StandardLogger* instance, int32_t level);

    void(CARB_ABI* setDebugConsoleOutputLevelThreshold)(StandardLogger* instance, int32_t level);

    void(CARB_ABI* setFileOutputLevelThreshold)(StandardLogger* instance, int32_t level);

    void(CARB_ABI* setFileConfiguration)(StandardLogger* instance,
                                         const char* filePath,
                                         const LogFileConfiguration* config);

    size_t(CARB_ABI* getFileConfiguration)(StandardLogger* instance,
                                           char* buffer,
                                           size_t bufferSize,
                                           LogFileConfiguration* config);

    void(CARB_ABI* pauseFileLogging)(StandardLogger* instance);

    void(CARB_ABI* resumeFileLogging)(StandardLogger* instance);

    void(CARB_ABI* setForceAnsiColor)(StandardLogger* instance, bool forceAnsiColor);

    // NOTE: This interface, because it is inherited from, is CLOSED and may not have any additional functions added
    // without an ILogging major version increase. See StandardLogger2 for adding additional functionality.
};

} // namespace logging
} // namespace carb