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()
``` 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)
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.
진정한 TradingView 정신에 따라, 저자는 이 파인 코드를 다른 파인 프로그래머들이 재사용할 수 있도록 오픈 소스 라이브러리로 공개했습니다. 저자에게 박수를 보냅니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈 소스 출판물에서 사용할 수 있지만, 이 코드를 출판물에서 재사용하는 것은 하우스 룰에 의해 관리됩니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.