B2Win Suite Documentation (Under Construction)
ContactB2Data
5.6
5.6
  • B2Win Suite Documentation
  • Scripting
    • B2Win Suite Scripting Overview
    • Scripting in B2Data
      • Custom Script Nodes
        • Custom Script
        • Source Script Node (File)
        • Source Script Node (Table)
        • Source Script Node (Object)
        • If-Else Condition
        • Switch case
        • Condition Node
      • In DataPrep
      • Properties
      • Workflow Applications
        • Workflow #1
        • Workflow #2
    • Getting Started
    • Language Basics
    • Types & Objects
      • Primitives
      • Objects
        • Instant
        • LocalDateTime
        • LocalDate
        • LocalTime
        • JsonNode
        • ObjectNode
        • File
        • SuiteTable
        • Duration
        • Period
      • Arrays & Maps
      • Row, Column, StringColumn
    • Utilities
      • Date & Time
        • InstantUtil
        • GeneralDateUtil
        • LocalDateTimeUtil
        • LocalDateUtil
        • LocalTimeUtil
        • Formatting
        • Timezones
      • Math
      • StrictMath
      • NumericUtil
      • DbUtil
      • DbExecutor
      • StateUtil
      • FileUtil
      • JsonUtil
      • HttpUtil
      • NodeInputReader
      • RandomUtil
      • HashingUtil
      • ShellUtil
      • CompressionUtil
      • Logging
    • Properties
    • Context and System
      • Context
      • System
    • Configurations
      • Workflow Configuration
    • Tutorial
    • Feedback
  • B2Data
    • Tutorials
      • Infor DataFabric to On-Premise Database Replication
      • API (DB replication, Email)
    • Workflow Settings
      • General Settings
      • Global/All Properties
      • Execution Configuration
        • General
        • Runtime
        • Compiler
        • Storage
        • Clean Up
      • Permissions
    • Nodes
      • Scheduler
    • Services Configuration
      • Microsoft Graph
Powered by GitBook
On this page
  • Logger Class
  • Methods

Was this helpful?

  1. Scripting
  2. Utilities

Logging

Logger Class

The Logger class is designed to facilitate logging within your application. It provides various log levels to categorize and differentiate the type and severity of log messages.

You can use this class to record important information, debug messages, warnings, and errors during the execution of your application.

Methods

info(format: String, ...args?: any[]): void

Use this method to log informational messages. It accepts a format string and optional additional arguments that can be interpolated into the format string.

These messages are typically used to convey important details about the application's operation.

// Log informational message
Logger.info("This is an informational message.");

debug(format: String, ...args?: any[]): void

The debug method is intended for logging debugging messages. Like info, it also accepts a format string and optional arguments.

Debugging messages help developers understand the inner workings of the application and troubleshoot issues during development and testing.

// Log debugging message with interpolated argument
var variable = 42;
Logger.debug("Debugging message: %s", variable);

warn(format: String, ...args?: any[]): void

To log warning messages, use the warn method. It accepts a format string and optional arguments.

Warning messages are crucial for notifying users or developers about potential issues that do not disrupt the application's flow but should be addressed.

// Log a warning message
Logger.warn("Warning: Something might be wrong.");

error(format: String, ...args?: any[]): void

The error method is designed to log error messages. It accepts a format string and optional arguments.

Error messages are essential for identifying critical issues that need immediate attention and resolution. They help pinpoint problems in the application.

// Log an error message
Logger.error("Error: Something went terribly wrong.");
PreviousCompressionUtilNextProperties

Was this helpful?