DPsim
Loading...
Searching...
No Matches
CPS::Logger Class Reference

Public Types

using Level = spdlog::level::level_enum
 
using Log = std::shared_ptr<spdlog::logger>
 

Static Public Member Functions

static String prefix ()
 
static String logDir ()
 
static void setLogDir (String path)
 Set env variable CPS_LOG_DIR and overwrite.
 
static Log get (const std::string &name, Level filelevel=Level::info, Level clilevel=Level::off)
 
static void setLogLevel (std::shared_ptr< spdlog::logger > logger, Logger::Level level)
 
static void setLogPattern (std::shared_ptr< spdlog::logger > logger, std::string pattern)
 
static String matrixToString (const Matrix &mat)
 
static String matrixCompToString (const MatrixComp &mat)
 
static String sparseMatrixToString (const SparseMatrix &mat)
 
static String sparseMatrixCompToString (const SparseMatrixComp &mat)
 
static String phasorMatrixToString (const MatrixComp &mat)
 
static String phasorToString (const Complex &num)
 
static String complexToString (const Complex &num)
 
static String realToString (const Real &num)
 
static String getCSVColumnNames (std::vector< String > names)
 
static String getCSVLineFromData (Real time, Real data)
 
static String getCSVLineFromData (Real time, const Matrix &data)
 
static String getCSVLineFromData (Real time, const MatrixComp &data)
 

Detailed Description

Definition at line 27 of file Logger.h.

Member Typedef Documentation

◆ Level

using CPS::Logger::Level = spdlog::level::level_enum

Definition at line 30 of file Logger.h.

◆ Log

using CPS::Logger::Log = std::shared_ptr<spdlog::logger>

Definition at line 31 of file Logger.h.

Member Function Documentation

◆ complexToString()

String Logger::complexToString ( const Complex & num)
static

Definition at line 63 of file Logger.cpp.

◆ get()

Logger::Log Logger::get ( const std::string & name,
Level filelevel = Level::info,
Level clilevel = Level::off )
static

Definition at line 139 of file Logger.cpp.

◆ getCSVColumnNames()

String Logger::getCSVColumnNames ( std::vector< String > names)
static

Definition at line 97 of file Logger.cpp.

◆ getCSVLineFromData() [1/3]

String Logger::getCSVLineFromData ( Real time,
const Matrix & data )
static

Definition at line 117 of file Logger.cpp.

◆ getCSVLineFromData() [2/3]

String Logger::getCSVLineFromData ( Real time,
const MatrixComp & data )
static

Definition at line 128 of file Logger.cpp.

◆ getCSVLineFromData() [3/3]

String Logger::getCSVLineFromData ( Real time,
Real data )
static

Definition at line 108 of file Logger.cpp.

◆ logDir()

String Logger::logDir ( )
static

Definition at line 81 of file Logger.cpp.

◆ matrixCompToString()

String Logger::matrixCompToString ( const MatrixComp & mat)
static

Definition at line 37 of file Logger.cpp.

◆ matrixToString()

String Logger::matrixToString ( const Matrix & mat)
static

Definition at line 31 of file Logger.cpp.

◆ phasorMatrixToString()

String Logger::phasorMatrixToString ( const MatrixComp & mat)
static

Definition at line 51 of file Logger.cpp.

◆ phasorToString()

String Logger::phasorToString ( const Complex & num)
static

Definition at line 57 of file Logger.cpp.

◆ prefix()

String Logger::prefix ( )
static

Definition at line 75 of file Logger.cpp.

◆ realToString()

String Logger::realToString ( const Real & num)
static

Definition at line 69 of file Logger.cpp.

◆ setLogDir()

void Logger::setLogDir ( String path)
static

Set env variable CPS_LOG_DIR and overwrite.

Definition at line 88 of file Logger.cpp.

◆ setLogLevel()

void Logger::setLogLevel ( std::shared_ptr< spdlog::logger > logger,
Logger::Level level )
static

Definition at line 20 of file Logger.cpp.

◆ setLogPattern()

void Logger::setLogPattern ( std::shared_ptr< spdlog::logger > logger,
std::string pattern )
static

Definition at line 25 of file Logger.cpp.

◆ sparseMatrixCompToString()

String Logger::sparseMatrixCompToString ( const SparseMatrixComp & mat)
static

Definition at line 47 of file Logger.cpp.

◆ sparseMatrixToString()

String Logger::sparseMatrixToString ( const SparseMatrix & mat)
static

Definition at line 43 of file Logger.cpp.


The documentation for this class was generated from the following files: