hyper_logger 0.2.0
hyper_logger: ^0.2.0 copied to clipboard
Composable logging for Dart and Flutter with automatic environment detection, scoped loggers, request-context propagation, file rotation, GCP/AWS/Azure JSON output, and a Crashlytics-friendly delegate API.
0.2.0 #
Breaking #
-
RotatingFilePrinterrotation API redesigned. The singlerotationConfig: FileRotationConfig.…parameter is replaced by:rotations: List<FileRotation>— a list of rotation rules, each a trigger (FileRotation.size/.interval/.daily/.onStart) crossed with aCadence(continuous, checked on every write, oronStart, checked once when the file opens). Rules compose as a union (the first to fire rotates), so size and time triggers can now be combined. An empty list (the default) appends forever.retention: FileRetention?— shared archive policy (maxFiles,maxAge,compress).maxBytes/intervalnow live on the rule; retention knobs moved here.FileRotationConfigis removed.
Migration:
FileRotationConfig.size(maxBytes: N, maxFiles: M, compress: c)→rotations: [FileRotation.size(N)], retention: FileRetention(maxFiles: M, compress: c);FileRotationConfig.interval(interval: D)→rotations: [FileRotation.interval(D)].
Added #
FileRotation.onStart({bool discard})— rotate (archive) or discard the existing log on every process start, e.g. a freshserver.logper run.FileRetention.maxAge— delete rotated archives older than a given duration (age parsed from the archive's filename timestamp), pruned on each rotation alongsidemaxFiles.
0.1.0 #
- Initial public release.