
.. _program_listing_file_cpp_include_torch_tensorrt_logging.h:

Program Listing for File logging.h
==================================

|exhale_lsh| :ref:`Return to documentation for file <file_cpp_include_torch_tensorrt_logging.h>` (``cpp/include/torch_tensorrt/logging.h``)

.. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS

.. code-block:: cpp

   /*
    * Copyright (c) NVIDIA Corporation.
    * All rights reserved.
    *
    * This library is licensed under the BSD-style license found in the
    * LICENSE file in the root directory of this source tree.
    */
   #pragma once
   
   #include <string>
   #include "torch_tensorrt/macros.h"
   
   namespace torch_tensorrt {
   namespace logging {
   enum Level {
     kINTERNAL_ERROR,
     kERROR,
     kWARNING,
     kINFO,
     kDEBUG,
     kGRAPH,
   };
   
   // Are these ones necessary for the user?
   TORCHTRT_API std::string get_logging_prefix();
   TORCHTRT_API void set_logging_prefix(std::string prefix);
   
   TORCHTRT_API void set_reportable_log_level(Level lvl);
   
   TORCHTRT_API void set_is_colored_output_on(bool colored_output_on);
   
   TORCHTRT_API Level get_reportable_log_level();
   
   TORCHTRT_API bool get_is_colored_output_on();
   
   // Dont know if we want this?
   TORCHTRT_API void log(Level lvl, std::string msg);
   } // namespace logging
   } // namespace torch_tensorrt
