-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
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"); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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
a895b02
to
046842c
Compare
* 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
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]>
This reverts commit 3426100.
This reverts commit 1248c38.
046842c
to
b8c9d7d
Compare
Messed up this PR very badly, opening a new one... |
This PR enhances our discombobulated logging framework by unifying all logs through our custom logger utility, replacing the use of
print
anddebugPrint
methods as suggested by Flutter. I have updated thelogger
library to the latest version and removed the unusedlogging
library from our dependencies. These changes streamline debugging across various packages, methods, and classes for improved efficiency.