langchain.js
    Preparing search index...
    • Retrieves the global logger instance for LangGraph Platform.

      The logger provides structured logging capabilities with various log levels (error, warn, info, debug, etc.) and extra metadata such as node name etc.

      Returns Logger

      The global logger instance with leveled logging methods

      When the logger is not available in the current environment

      // Safe usage with fallback
      const logger = getLogger();
      logger.info("This will only work in LangGraph Platform environment");

      This method is designed to work specifically within the LangGraph Platform environment where a global logger is automatically registered. If you're developing locally or in an environment where LangGraph Platform is not available, this function will throw an error.