leancodepl / leancodepl/logging_bugfender

Use `dart:developer` for console printing

Open
#11 0 comments 0 reactions 1 assignee View on GitHub

@mateusz-pietras is already working on this.

Since Nov 11, 2024.

Dominant language
Dart
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Theres a dedicated function in dart:developer for printing log records from package:logging: https://api.flutter.dev/flutter/dart-developer/log.html. This function takes all arguments from logging's LogRecord:

    developer.log(
      rec.message,
      name: rec.loggerName,
      error: rec.error,
      stackTrace: rec.stackTrace,
      level: rec.level.value,
      time: rec.time,
      sequenceNumber: rec.sequenceNumber,
      zone: rec.zone,
    );

I don't exactly know what it does other than printing to console, but the printing is much nicer than current's PlainTextPrintStrategy strategy. Unfortunately strategies don't allow for custom printing, just for custom string creation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.