HomeWiki
HomeWiki
  1. Log
  • Back to home
  • 2. Connectivity
  • Introduction
  • Custom Script
  • Playground
  • Database Explorer
  • Log Stream
  • Direct Communication
  • Softone
    • Getting Started
  • Datapump
    • Getting Started
    • Crons
    • Legacy Windows Support
    • SDK
      • DB
        • _executeQuery
        • _executeStoreProcedure
        • _executeInsertQuery
        • _executeInsertQueriesInTransaction
      • Import
        • _productsImport
        • _categoriesImport
        • _brandsImport
        • _attributesImport
        • _attributeSetsImport
        • _unitsImport
        • _quantityImport
        • _customersImport
        • _contactsImport
        • _callsImport
        • _eventsImport
        • _tasksImport
        • _ordersImport
        • _usersImport
        • _customerSourceTagsImport
        • _productSourceTagsImport
      • Log
        • _logDebug
        • _logInfo
        • _logWarn
        • _logError
      • Web Requests
        • _httpGetJson
        • _httpPostJson
        • _httpPutJson
        • _httpDeleteJson
        • _httpPatchJson
      • Variables
        • _saveVariable
        • _getVariable
        • _deleteVariable
      • Blob
        • _blobConnect
        • _blobExists
        • _blobGet
        • _blobFind
      • Utils
        • _encodeBase64
        • _sleep
        • _getLastSyncDate
        • _updateLastSyncDate
        • _resetLastSyncDate
  1. Log

_logDebug

Documentation: _logDebug Function#

The _logDebug function is used to log debug messages within the system. This function helps developers and system administrators to track and monitor the behavior of the application during development or troubleshooting. It provides an option to categorize logs using tags for better organization and filtering.

Function Signature:#

Parameters:#

log (Required):
Description: The debug message that needs to be logged. This should be a descriptive string that provides information about the current state of the application or any significant events.
Type: String
Example:
tag (Optional):
Description: A tag that categorizes the log message. Tags can help in filtering logs for specific areas of the application, making it easier to focus on relevant information. If not provided, the log will be categorized as "General".
Type: String
Example:

Return Value:#

Returns:
The function does not return any value. It performs the logging operation and stores the log message with an optional tag.

Function Workflow:#

1.
Validate Log Message:
The function first checks if the log parameter is provided and is a valid string. If the log is missing or invalid, it may raise an error or ignore the logging operation.
2.
Assign Tag:
If the tag parameter is provided, the log message is associated with that tag. If the tag is not provided, the function assigns a default tag, such as "General" or "Uncategorized".
3.
Log the Message:
The function logs the message along with the associated tag (if any). This may involve storing the log in a file, sending it to a logging server, or displaying it in a console.
4.
Optional Error Handling:
The function may handle any exceptions or errors that occur during the logging process, ensuring that the application continues to run smoothly.

Example Usage:#

Important Considerations:#

Use Descriptive Log Messages:
Ensure that the log parameter contains meaningful and descriptive information that can help in debugging or monitoring the application.
Utilize Tags for Better Organization:
When using the tag parameter, choose tags that clearly indicate the area of the application the log relates to. This can make it easier to filter and analyze logs later.
By using _logDebug, developers can efficiently track and debug application processes, ensuring better visibility and quicker resolution of issues.
Previous
_productSourceTagsImport
Next
_logInfo
Built with