dajno_logging (1.0.0)

Published 2026-08-22 12:07:02 +00:00 by Platform

Installation

dart pub add dajno_logging:1.0.0 --hosted-url=

About this package

Simple console logger with levels and caller-location resolution.

Dart.Package.Logging

Simple console logger with levels (info/debug/warning/error/assertion/fatal) and caller file/line resolution via package:stack_trace (ported from the old platform).

Quick start

import 'package:dajno_logging/dajno_logging.dart';

void main() {
  Log.info('Service started');
  Log.warning('Cache miss');
  Log.assertion(1 + 1 == 2, 'math is broken');
  Log.error('Something went wrong'); // throws by default
  Log.error('Log only', throwException: false);
}

Note from the migration

The old platform published this package as logging — the same name as the well-known logging package on pub.dev. That's a hard conflict, not just a version-range one: package:test pulls in the real pub.dev logging package transitively (via webkit_inspection_protocol), and Dart's pub solver treats "package logging from pub.dev" and "package logging from a private hosted feed" as fundamentally different, unresolvable identities — no version constraint fixes it, dart pub get fails version solving outright. Renamed to dajno_logging (matching the dajno_* naming already used for the Python side of this migration, e.g. dajno-ml) to remove the collision entirely. Every dependent (Dart.Package.Observables, Dart.Package.Network) was updated to depend on dajno_logging instead.

Project structure

pubspec.yaml
Version.txt              the version to publish
lib/
├── dajno_logging.dart    public API — exports
└── src/
    ├── log.dart           Log — static logging facade
    └── log_level.dart     LogLevel enum
test/
└── dajno_logging_test.dart
example/
└── example.dart

Versioning and publishing

Version.txt is the exact version that gets published — a push to main publishes it only when that version isn't on the feed yet. Pushes to any other branch only resolve and test.

CI

.forgejo/workflows/build.yml installs the Dart SDK, resolves dependencies, and runs dart test on every push. On main, it also publishes via dart pub publish, tags the commit v<version>, and creates a matching Release — via the shared Platform/Forgejo.Package.Actions/dart-publish composite action. .forgejo/workflows/cleanup.yml removes prerelease Pub versions when their branch is deleted.

Details
Pub
2026-08-22 12:07:02 +00:00
18
3.9 KiB
Assets (1)
1.0.0.tar.gz 3.9 KiB
Versions (2) View all
1.1.0 2026-09-21
1.0.0 2026-08-22