![]()  | 
  
    ArkScript
    
   A small, lisp-inspired, functional scripting language 
   | 
 
#include <Logger.hpp>
Classes | |
| struct | MessageAndLocation | 
Public Member Functions | |
| Logger (std::string name, unsigned debug_level) | |
| Construct a new Logger object.   | |
| unsigned | debugLevel () const | 
| bool | shouldInfo () const | 
| bool | shouldDebug () const | 
| bool | shouldTrace () const | 
| template<typename... Args> | |
| void | info (const char *fmt, Args &&... args) | 
| Write an info level log using fmtlib.   | |
| template<typename... Args> | |
| void | debug (const Logger::MessageAndLocation &data, Args &&... args) | 
| Write a debug level log using fmtlib.   | |
| void | traceStart (std::string &&trace_name) | 
| void | traceEnd () | 
| template<typename... Args> | |
| void | trace (const char *fmt, Args &&... args) | 
| Write a trace level log using fmtlib.   | |
Private Attributes | |
| unsigned | m_debug | 
| std::string | m_name | 
| fmt::color | m_pass_color | 
| std::unordered_map< std::string, std::chrono::time_point< std::chrono::high_resolution_clock > > | m_trace_starts | 
| std::vector< std::string > | m_active_traces | 
Definition at line 24 of file Logger.hpp.
| Ark::internal::Logger::Logger | ( | std::string | name, | 
| unsigned | debug_level ) | 
Construct a new Logger object.
| name | the pass name, used for logging | 
| debug_level | debug level | 
Definition at line 29 of file Logger.cpp.
References Ark::internal::colors, m_name, and m_pass_color.
      
  | 
  inline | 
Write a debug level log using fmtlib.
| Args | 
| data | format string | 
| args | 
Definition at line 77 of file Logger.hpp.
References Ark::internal::Logger::MessageAndLocation::location, m_name, m_pass_color, Ark::internal::Logger::MessageAndLocation::message, and shouldDebug().
Referenced by Ark::internal::ImportSolver::process(), Ark::internal::MacroProcessor::process(), and Ark::internal::Optimizer::pruneUnusedGlobalVariables().
      
  | 
  inlinenodiscard | 
Definition at line 47 of file Logger.hpp.
References m_debug.
      
  | 
  inline | 
Write an info level log using fmtlib.
| Args | 
| fmt | format string | 
| args | 
Definition at line 60 of file Logger.hpp.
References m_name, m_pass_color, and shouldInfo().
Referenced by Ark::Welder::saveBytecodeToFile().
      
  | 
  inlinenodiscard | 
      
  | 
  inlinenodiscard | 
      
  | 
  inlinenodiscard | 
Definition at line 51 of file Logger.hpp.
References m_debug.
Referenced by Ark::internal::MacroProcessor::process(), Ark::internal::NameResolutionPass::process(), Ark::internal::Optimizer::process(), trace(), and Ark::internal::NameResolutionPass::updateSymbolWithFullyQualifiedName().
      
  | 
  inline | 
Write a trace level log using fmtlib.
| Args | 
| fmt | format string | 
| args | 
Definition at line 113 of file Logger.hpp.
References m_name, m_pass_color, and shouldTrace().
Referenced by Ark::internal::MacroProcessor::process(), Ark::internal::NameResolutionPass::process(), Ark::internal::Optimizer::process(), and traceEnd().
      
  | 
  inline | 
Definition at line 96 of file Logger.hpp.
References m_active_traces, m_trace_starts, and trace().
Referenced by Ark::internal::ImportSolver::parseImport(), Ark::internal::ASTLowerer::process(), Ark::internal::ImportSolver::process(), Ark::internal::IRCompiler::process(), Ark::internal::IROptimizer::process(), Ark::internal::MacroProcessor::process(), Ark::internal::NameResolutionPass::process(), Ark::internal::Optimizer::process(), and Ark::internal::Parser::process().
      
  | 
  inline | 
Definition at line 90 of file Logger.hpp.
References m_active_traces, and m_trace_starts.
Referenced by Ark::internal::ImportSolver::parseImport(), Ark::internal::ASTLowerer::process(), Ark::internal::ImportSolver::process(), Ark::internal::IRCompiler::process(), Ark::internal::IROptimizer::process(), Ark::internal::MacroProcessor::process(), Ark::internal::NameResolutionPass::process(), Ark::internal::Optimizer::process(), and Ark::internal::Parser::process().
      
  | 
  private | 
Definition at line 128 of file Logger.hpp.
Referenced by traceEnd(), and traceStart().
      
  | 
  private | 
Definition at line 124 of file Logger.hpp.
Referenced by debugLevel(), shouldDebug(), shouldInfo(), and shouldTrace().
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
Definition at line 127 of file Logger.hpp.
Referenced by traceEnd(), and traceStart().