pAulseperformance

LoggerLib

pAulseperformance 업데이트됨   
Library "LoggerLib"
Function Description:
This library aims to extend the logging functionality by overloading various logging methods.
The objective is to enable appending ".log" at the end of different types to make logging outputs easier.

Key features of this function include:
Multi Debug Levels: The readout will encompass error, warning, and info messages.
Controlled Output: Logging can be set for every bar or only the last X bars.
Automatic Logging: Essential variables such as bar_index, time, price, and # of times log has been called can be extracted.
Methods Included:
Logs variables.
Logs floats.
Logs integers.
Logs strings.
Logs booleans.
Logs arrays.
Logs matrices.
Logs maps.
This comprehensive logging function enhances logging capabilities,
providing versatility and ease of use in capturing and debugging data across different contexts.

method log(this, debugLevel, showLast, verbose, showLabels)
  Logs any variable type, excluding custom UDTs, and displays to the logs or as a label on bars.
```
// Example
variable = close
variable.log()
variable.log(2, 0,true,true)

// Example Arrays
ArrayVariable = array.from()
ArrayVariable.log()

// Examples Maps
MapVariable = map.new<string, float>()
MapVariable.log( )

// Example Funky stuff
close.log(debugLevel = 1, showLast = 1, verbose = true, showLabels = true)

```
  Namespace types: series float, simple float, input float, const float
  Parameters:
    this (float): Variable to be formatted into a logger message
    debugLevel (int): Log Level `1 = log.info | 2 = log.warning 3 = log.error`
    showLast (int): Shows last x Logs, 0 shows all.
    verbose (bool): Include additional Debug logger Data.
    showLabels (bool): Create Labels of the logs on that main chart.
  Returns: void

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: series int, simple int, input int, const int
  Parameters:
    this (int)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: series string, simple string, input string, const string
  Parameters:
    this (string)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: series bool, simple bool, input bool, const bool
  Parameters:
    this (bool)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: series color, simple color, input color, const color
  Parameters:
    this (color)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: array<float>
  Parameters:
    this (array<float>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: array<int>
  Parameters:
    this (array<int>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: array<string>
  Parameters:
    this (array<string>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: array<bool>
  Parameters:
    this (array<bool>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<float, float>
  Parameters:
    this (map<float, float>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<float, int>
  Parameters:
    this (map<float, int>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<float, string>
  Parameters:
    this (map<float, string>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<float, bool>
  Parameters:
    this (map<float, bool>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<int, float>
  Parameters:
    this (map<int, float>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<int, int>
  Parameters:
    this (map<int, int>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<int, string>
  Parameters:
    this (map<int, string>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<int, bool>
  Parameters:
    this (map<int, bool>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<string, float>
  Parameters:
    this (map<string, float>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<string, int>
  Parameters:
    this (map<string, int>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<string, string>
  Parameters:
    this (map<string, string>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<string, bool>
  Parameters:
    this (map<string, bool>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<bool, float>
  Parameters:
    this (map<bool, float>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<bool, int>
  Parameters:
    this (map<bool, int>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<bool, string>
  Parameters:
    this (map<bool, string>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: map<bool, bool>
  Parameters:
    this (map<bool, bool>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: matrix<float>
  Parameters:
    this (matrix<float>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: matrix<int>
  Parameters:
    this (matrix<int>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: matrix<string>
  Parameters:
    this (matrix<string>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

method log(this, debugLevel, showLast, verbose, showLabels)
  Namespace types: matrix<bool>
  Parameters:
    this (matrix<bool>)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)
릴리즈 노트:
v2
릴리즈 노트:
v3

Updated:
method log(this, tag, debugLevel, showLast, verbose, showLabels)
  Namespace types: matrix
  Parameters:
    this (matrix)
    tag (string)
    debugLevel (int)
    showLast (int)
    verbose (bool)
    showLabels (bool)

Breaking Changes.
Included a "tag" parameter in the log. This way we can make notes on our logged variables in the first parameters of the logger. Allowing us to easily differentiate between the variables we are tracking in the Pine Logs.

ie
 
close.log('My special variable to keep track of')
close.log(tag='The close')

Trade, Code, & Travel.

www.pinescriptstrategy.com
파인 라이브러리

트레이딩뷰 정신에 따라 오써는 이 파인 코드를 오픈 소스 라이브러리로 퍼블리쉬하여 당사 커뮤니티의 다른 파인 프로그래머들이 쓸 수 있도록 하였습니다. 오써에게 찬사를! 여러분은 이 라이브러리를 프라이빗 또는 오픈 소스 퍼블리케이션에 쓸 수 있지만 퍼블리케이션에 재사용은 하우스룰을 따릅니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

이 라이브러리를 쓰시겠습니까?

텍스트를 클립보드에 카피한 뒤 님의 스크립트에 붙여 넣기.