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

_logInfo

Documentation: _logInfo Function#

The _logInfo function is used to log informational messages within the system. It is intended for logging non-critical, yet important events that provide insight into the normal operations of the application. This function allows developers and system administrators to keep track of significant events or checkpoints, with an option to categorize the logs using tags for easier filtering.

Function Signature:#

Parameters:#

log (Required):
Description: The informational message that needs to be logged. This should be a clear and descriptive string that provides details about a specific event or state in the application.
Type: String
Example:
tag (Optional):
Description: A tag that categorizes the log message. Tags help in organizing and filtering logs, allowing you to focus on specific areas of the application. If not provided, the log will be categorized under a default tag like "General".
Type: String
Example:

Return Value:#

Returns:
The function does not return any value. It performs the logging operation by storing or displaying the informational message along with the associated 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, the logging operation might be skipped or an error might be raised.
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 "Info".
3.
Log the Message:
The function logs the informational message along with the tag (if any). This might involve writing the log to a file, sending it to a logging server, or displaying it in a console.
4.
Optional Error Handling:
The function may include error handling to ensure that any issues during the logging process do not disrupt the normal operation of the application.

Example Usage:#

Important Considerations:#

Use Informative Messages:
Ensure that the log parameter contains clear and concise information that helps in understanding the state or event being logged.
Leverage Tags for Clarity:
Use the tag parameter to group related logs together, making it easier to search and analyze logs for specific components or processes in the application.
By utilizing _logInfo, developers can effectively document important events and milestones in the application's lifecycle, aiding in monitoring and understanding the system's behavior.
Modified at 2024-08-23 11:53:53
Previous
_logDebug
Next
_logWarn
Built with