#
Use the logger
Squide integrates with the @workleap/logging library by accepting a loggers array during initialization. If no loggers are provided and the application is running in development mode, Squide automatically attaches a BrowserConsoleLogger instance to the runtime.
For more details, refer to the initializeFirefly and useLogger reference documentation.
#
Log a message
To log a message, retrieve Squide logger instance throughout the application with the useLogger hook and write a log entry using any of the available methods:
import { useLogger } from "@squide/firefly";
const logger = useLogger();
logger.debug("Hello!");
For more information on how to use the logger, refer to the @workleap/logging package's documentation.
Never log any Personally Identifiable Information (PII).
API responses frequently contain sensitive user data such as names, email addresses, phone numbers, or IDs. Remove all logs outputting API response before deploying to production, as these can expose private information that will be included in session replays.
For debugging, use console.log instead, since its output is not captured in LogRocket session replays.
#
Setup loggers
Refer to the setup the logger integration guide.