saborter

Documentation for development functionality

📖 Overview

This document describes utilities designed for development and debugging purposes. They control logging behavior and allow you to enhance error stack traces with additional debugging information.

🔧 API

Import

import { setLoggerMode, setDebugErrorStackMode } from 'saborter/dev';

setLoggerMode

Sets the global logging mode for the application. This function updates internal flags that determine whether logging is enabled and whether informational logs should be suppressed.

Parameters:

Example:

// Enable logging but skip info messages
setLoggerMode(true, { skipInfo: true });

// Disable all logging
setLoggerMode(false);

setDebugErrorStackMode

Enables or disables the inclusion of debug information in error stack traces for classes that extend ExtendedStackError.

Parameters:

Example:

// Enable debug stack information
setDebugErrorStackMode(true);