-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from borlnov/5-add-firebase-authentication
Add new package for supporting firebase.
- Loading branch information
Showing
90 changed files
with
2,027 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
bro_abstract_logger/lib/src/helpers/default_logger_helper.dart
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
bro_abstract_logger/lib/src/helpers/multi_print_logger.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// SPDX-FileCopyrightText: 2025 Benoit Rolandeau <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import 'package:bro_abstract_logger/bro_abstract_logger.dart'; | ||
|
||
/// This printer allows to print to multiple [LoggerHelper]s. | ||
class MultiPrintLogger with MixinExternalLogger { | ||
/// The list of [LoggerHelper]s to log to. | ||
final List<LoggerHelper> _otherLoggers; | ||
|
||
/// Create a [MultiPrintLogger] with multiple [LoggerHelper]s. | ||
MultiPrintLogger({ | ||
required List<LoggerHelper> loggers, | ||
}) : _otherLoggers = loggers; | ||
|
||
/// {@macro bro_abstract_logger.MixinExternalLogger.log} | ||
@override | ||
void log( | ||
LogsLevel level, | ||
String message, { | ||
List<String> categories = const [], | ||
}) { | ||
for (final logger in _otherLoggers) { | ||
logger.log(level, message); | ||
} | ||
} | ||
|
||
/// {@macro bro_abstract_logger.MixinExternalLogger.logErrorWithException} | ||
@override | ||
void logErrorWithException( | ||
// We use dynamic here to be able to log any type of exception | ||
// ignore: avoid_annotating_with_dynamic | ||
dynamic exception, { | ||
StackTrace? stackTrace, | ||
bool isFatal = false, | ||
List<String> categories = const [], | ||
}) { | ||
for (final logger in _otherLoggers) { | ||
logger.logErrorWithException( | ||
exception, | ||
stackTrace: stackTrace, | ||
isFatal: isFatal, | ||
); | ||
} | ||
} | ||
|
||
/// {@macro bro_abstract_logger.MixinExternalLogger.dispose} | ||
@override | ||
Future<void> dispose() async {} | ||
} |
Oops, something went wrong.