PINE LIBRARY

Console

업데이트됨
📕 Console Library


🔷 Introduction

This script is an adaptation of the classic JavaScript console script. It provides a simple way to display data in a console-like table format for debugging purposes.

While there are many nice console/logger scripts out there, my personal goal was to achieve inline functionality and visual object (label, lines) logging.



🔷 How to Use

◼ 1. Import the Console library into your script:



- or -

Instead of the library namespace, you can define a custom namespace as alias.





◼ 2. Create and init a new `<terminal>` object.

The `init()` method is used to initialize the console object with default settings. It can be used to customize it.



- or -

If you has set up an alias before.





◼ 3. Logging





◼ 4. Visibility

Finally, we need to call the `show()` method to display the logged messages in the console.

릴리즈 노트
🔷 v2

- Included missing data types, enabling logging of any type except tables while including arrays/matrices.
The log() method now offers four different variants, each corresponding to a possible type.




- If you only require a string representation, you can utilize the .toString() function, which is available for all types except tables, including arrays/matrices.
Introduced new temporary options: opt_textColor, opt_bgColor, and opt_textSize.

릴리즈 노트
🔷 v3

Enhanced Functionality
One of the key additions is the introduction of `_prefix`, `_delimiter`, `_lvl` options to all variants of the `log()` function. Now you have greater flexibility and control over how your logs are displayed.

📚 Updated Documentation
To make your experience even better, I've revamped my documentation. You'll find NEW BADGES that provide useful information and make it easier to navigate through the documentation.

🆕 Additional Methods
I listened to your feedback! In response, I have included the previously missing `.tostring()` method for `<box>`, `array<box>`, `linefill`, `array <linefill>` and matrix<linefill>.
You can now convert them into `<string>` representations effortlessly.

Supported Types

With these updates, I've achieved comprehensive support for all types, excluding `<tables>`. You can now log and stringify allmost anything with ease.

Simply use:



Here's a quick recap of the supported types:


⛔ Unsupported Types:


Your feedback and suggestions have been invaluable in shaping a big part of my scripts, so please keep them coming.

Thank you for your continued support!
릴리즈 노트
🔷 v4

Updated the function arguments to address a known override issue that occurs when logging an integer with a prefix in function calls. In result, I have separated the log level from the main `log()` function. You can now set the log level by using the `opt_lvl(int)` function.
릴리즈 노트
🔷 v5

🐛 Bug Fixes
  • Column 0 is out of table bounds: A big thank you to doqkhanh for reporting this issue. I've fixed the bug. Now, both initialization methods with and without var are working perfectly


Enhancements
  • Script Documentation Update: I've updated the script documentation to enhance your experience. Please note that currently, multiline function arguments break the custom documentation on hovering, so I've reformatted it to single lines.


📑I'm dedicated to offering the best possible experience with this library. Your feedback and reports are always welcome. 😊
릴리즈 노트
🔷 v6

🐛 Bug Fixes
  • FIXED: Inline Color Function
  • FIXED: Offset Error


🆕 New Stuff
  • Formatted Tooltip Output for Arrays and Matrices
  • Support for new built-in type: chart.point

릴리즈 노트
🔷 v7

🎉 Exciting New Features

🆕 Hybrid Logs: Added Support for the New Native Logging Feature

  • Introducing a new way to log data with hybrid logs, enhancing the flexibility and control of your logging experience.
  • Added a new string field to the terminal object called display, allowing you to specify where the logs should be displayed. Options include 'all', 'chart', 'logs'. Default is set to 'all'.
  • This feature enables more targeted logging, allowing you to choose the appropriate display method for your specific use case.


🆕 New Log Variant: Direct Logging to the App Log Window
  • Now you can log directly to the app's native log window, providing a streamlined and efficient logging process.
  • This direct logging variant automatically converts all supported native types to strings, making it easier to log data without the need for manual conversion.
  • Ideal for simple logging tasks where direct access to the native log window is preferred.


As Short As Simple


📑 Continuous Improvement
As always, I'm committed to providing the best experience with this library. These new features are designed to enhance your logging capabilities and offer more flexibility in how you interact with logs. Your feedback and suggestions are highly valued, and I look forward to hearing how these updates enhance your development process. 😊
릴리즈 노트
🔷 v8

🐛 Bug Fix
  • FIXED: Wrong data return
consolecryptolinxdebugdebuggerdebuggingdisplayformattingLOGloggingterminal

파인 라이브러리

진정한 TradingView 정신에 따라, 저자는 이 파인 코드를 다른 파인 프로그래머들이 재사용할 수 있도록 오픈 소스 라이브러리로 공개했습니다. 저자에게 박수를 보냅니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈 소스 출판물에서 사용할 수 있지만, 이 코드를 출판물에서 재사용하는 것은 하우스 룰에 의해 관리됩니다.

면책사항