iLogger

Logger Library based on types and methods.
method init(this)
init will initialize logger table and log stream array
Namespace types: Logger
Parameters:
this (Logger): Logger object
Returns: void
method getLogger(level)
Namespace types: series LogLevel
Parameters:
level (series LogLevel)
method setPage(this, pageNumber)
setPage will set current page number of logs to display
Namespace types: Logger
Parameters:
this (Logger): Logger object
pageNumber (int): - Page number of logs to display
Returns: void
method nextPage(this)
nextPage will incremement page number to display on screen
Namespace types: Logger
Parameters:
this (Logger): Logger object
Returns: void
method previousPage(this)
previousPage will decrement page number to display on screen
Namespace types: Logger
Parameters:
this (Logger): Logger object
Returns: void
method log(this, level, message)
log will record message to be logged and repopulate logs displayed
Namespace types: Logger
Parameters:
this (Logger): Logger object
level (series LogLevel): logging level. Can be `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`, `CRITICAL`. Logs only if log level is higher than Loggers minimul log level set
message (string): log message to be recorded
Returns: void
method trace(this, message)
trace will record message to be logged with level 'TRACE'
Namespace types: Logger
Parameters:
this (Logger): Logger object
message (string): log message to be recorded
Returns: void
method debug(this, message)
debug will record message to be logged with level 'DEBUG'
Namespace types: Logger
Parameters:
this (Logger): Logger object
message (string): log message to be recorded
Returns: void
method info(this, message)
info will record message to be logged with level 'INFO'
Namespace types: Logger
Parameters:
this (Logger): Logger object
message (string): log message to be recorded
Returns: void
method warn(this, message)
warn will record message to be logged with level 'WARN'
Namespace types: Logger
Parameters:
this (Logger): Logger object
message (string): log message to be recorded
Returns: void
method error(this, message)
error will record message to be logged with level 'ERROR'
Namespace types: Logger
Parameters:
this (Logger): Logger object
message (string): log message to be recorded
Returns: void
method fatal(this, message)
fatal will record message to be logged with level 'FATAL'
Namespace types: Logger
Parameters:
this (Logger): Logger object
message (string): log message to be recorded
Returns: void
Log
Log Object holding log entry
Fields:
level (series LogLevel): Logging level
message (series string): Logging message
bartime (series int): bar time at which log is recorded
bar (series int): bar index at which log is recorded
Logger
Logger object which can be used for logging purposes
Fields:
position (series string): position on chart where logs can be shown. Valid values are table position values. Make sure that the script does not have any other table at this position
pageSize (series int): size of each page of logs which can be shown on UI. Default is 10
maxEntries (series int): max size logs to be stored
pageNumber (series int): current page number of logs to display on chart
textSize (series string): size of text on debug table to be shown. default is size.small. Other options - size.tiny, size.normal, size.large, size.huge, size.auto
textColor (series color): text color of debug messages. Default is color.white
showOnlyLast (series bool): If set, shows the logs derived only from last bar. Default is true
minimumLevel (series LogLevel): Minimum level of logs to be considered for logging.
realTime (series bool): Print logs based on real time bar. This should be set to true for debugging indicators and false for debugging strategies.
debugTable (series table): table containing debug messages. It will be set in init method. Hence no need to pass this in constructor
logs (array<Log>): Array of Log containing logging messages. It will be set in init method. Hence no need to pass this in constructor
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Declinazione di responsabilità
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io