Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve and unify the logging framework #712

Closed
wants to merge 82 commits into from

Conversation

meenbeese
Copy link
Contributor

This PR enhances our discombobulated logging framework by unifying all logs through our custom logger utility, replacing the use of print and debugPrint methods as suggested by Flutter. I have updated the logger library to the latest version and removed the unused logging library from our dependencies. These changes streamline debugging across various packages, methods, and classes for improved efficiency.

@meenbeese meenbeese changed the title Improve logging framework Improve and unify the logging framework Sep 10, 2023
@meenbeese
Copy link
Contributor Author

I had some issues with conflicting commits and rebases but they should be fixed now.

lib/main.dart Outdated
@@ -35,8 +35,8 @@ import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:flutter_displaymode/flutter_displaymode.dart';

Future<void> main(List<String> rawArgs) async {
final logger = getLogger("Spotube");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need it here?


void main() async {
final logger = getLogger("GenCredits");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this file's changes. It's not for debug purposes. The output needs not to be decorated

@@ -13,6 +14,8 @@ import 'dart:io';
/// Example: dart bin/untranslated_messages.dart bn

void main(List<String> args) {
final logger = getLogger("UntranslatedMessages");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this one as well. We need clean logs not decorated logs

@@ -15,8 +17,7 @@ void main() {
throw Exception("In new releases pkgrel should be 1");
}
} catch (e) {
// ignore: avoid_print
print("[Failed to parse PKGBUILD] $e");
logger.d("[Failed to parse PKGBUILD] $e");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be logger.e

@@ -123,8 +126,8 @@ mixin NextFetcher on StateNotifier<ProxyPlaylist> {
);
}
} catch (e, stackTrace) {
debugPrint(e.toString());
debugPrintStack(stackTrace: stackTrace);
logger.d(e.toString());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger.e should be used

@meenbeese meenbeese force-pushed the improve-logging-framework branch 3 times, most recently from a895b02 to 046842c Compare September 20, 2023 00:40
karniv00l and others added 23 commits September 19, 2023 20:45
* Update bug_report.yml

* Create app_es.arb

* Fix the missing lines and improve the translation

---------

Co-authored-by: Kingkor Roy Tirtho <[email protected]>
* Force High Refresh Rate on some Android devices

* fix: check android platform for high refresh-rate

---------

Co-authored-by: Kingkor Roy Tirtho <[email protected]>
* feat: concurrent download service & download prorvider

* feat: implement chunked downloader

* fix: no audio-tags in Linux and duration not showing up for local tracks

* feat: show matching tracks in queue as well

* feat: always uses piped api for download to avoid IP block

* fix: invalid downloadCount
KRTirtho and others added 21 commits September 19, 2023 20:45
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: fill missing translations

* chore: vscode filenesting

* fix: add missing dependency in debian package

* fixes KRTirtho#703

---------

Co-authored-by: Kingkor Roy Tirtho <[email protected]>
…ho#705)

* chore: refactor CLI stuff to separate service folder

* chore: trying to fix memory leak

* chore: fix fl_Query_devtools in wrong place

* chore: upgrade deps

* fix: user liked tracks memory leak due to isStale & updateQueryFn
* chore: fill missing translations

* chore: vscode filenesting

* fix playlist grey page

---------

Co-authored-by: Kingkor Roy Tirtho <[email protected]>
* feat: playlist metadata edit support

* refactor: replace file_picker with file_selector
* chore: fill missing translations

* chore: vscode filenesting

* docs: Add meenbeese  (KRTirtho#713)

* CircleCI Commit

* cd: updated circle ci build config

* cd: use custom flutter installation

* cd: use ubuntu 22.04

* cd: fix project var syntax

* cd: directly echo secrets to .env file

* cd: export bash env

* cd: they I'm stupid

* cd: ugghh breaking flutter changes on every major version

* cd: add other empty keys to .env

* cd: works!!!

* cd: store artifacts

* cd: add other package formats in circle ci build

* cd: add pub cache path

* cd: remove dart run from flutter_distributor

* cd: add appimage installer

* cd: sudo

* cd: appimagetool in path

* cd: use aarch64 binary of appimagetool

* cd: add rpmbuild deps

* cd: fix rpm arch

* cd: add github release upload capability

* cd: enable github creds context

* cd: remove token

* cd: remove parallelism

* cd: why typo??!

* cd: add github action to trigger Circle CI pipeline

* cd: trigger CCI using curl

* cd: remove quotes from bool field

* cd: ain't no

* cd: poor choice

---------

Co-authored-by: meenbeese <[email protected]>
@meenbeese meenbeese force-pushed the improve-logging-framework branch from 046842c to b8c9d7d Compare September 20, 2023 00:45
@meenbeese
Copy link
Contributor Author

Messed up this PR very badly, opening a new one...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants