io library

dart:io-dependent sinks for steno. Import alongside the main library when you need file output:

import 'package:steno/steno.dart';
import 'package:steno/io.dart';

final fileSink = RollingFileSink(path: 'app.log', maxBytes: 5 * 1024 * 1024);
Steno.configure(
  LoggerProfile.production(sinks: [fileSink]),
);

This library cannot be imported on the web — dart:io is not available there. Keep your file-sink wiring in a platform-conditional import if your code targets web as well.

Classes

FileSink
Appends formatted events to a single file.
RollingFileSink
Appends events to a file, rotating when the current file exceeds a size threshold. Keeps up to keep older files on disk (foo.log.1, foo.log.2, …) and deletes the oldest on rotation.