Skip to content

Loggical API Documentation v1.0.1


Loggical API Documentation / serverLogger

Variable: serverLogger

ts
const serverLogger: Logger;

Defined in: presets/instances.ts:77

Production logger optimized for server environments

Configured for production use with compact formatting, abbreviated prefixes, enhanced syntax highlighting, and separators for better log parsing. Balances readability with performance and log volume concerns.

Example

typescript
import { serverLogger } from 'loggical'

const apiLogger = serverLogger.withPrefix('API-GATEWAY')
apiLogger.warn('High memory usage', { usage: 85.7, threshold: 80 })
// Output: 14:32:18.456 ⚠️ [API-GTW] High memory usage { usage: 85.7%, threshold: 80% }

Released under the MIT License.