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

Feature: Adding LogLevel to Lumberdash #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

maximilianbrandl
Copy link

No description provided.

@fabiomcarneiro fabiomcarneiro changed the title adding LogLevel to Lumberdash Feature: Adding LogLevel to Lumberdash Feb 8, 2022
@fabiomcarneiro fabiomcarneiro added the enhancement New feature or request label Feb 8, 2022
Copy link
Member

@fabiomcarneiro fabiomcarneiro left a comment

Choose a reason for hiding this comment

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

Thanks for the adding the feature. 👍
Please also update the main Lumberdash and plugins versions with a minor increment.

putLumberdashToWork({required List<LumberdashClient> withClients}) {
_lumberdashClients = withClients;
withClients.forEach((client) {_lumberdashClients.forEach((_, logLevelClients) {logLevelClients.add(client);});});
Copy link
Member

Choose a reason for hiding this comment

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

Can you multi line format this for each?

/// [LumberdashClient] to a List of LogLevels. Only these LogLevels
/// are used for logging to the LumberdashClient.
putLumberdashToWorkByLogLevel({required Map<LumberdashClient, List<LogLevel>> withClients}) {
withClients.forEach((keyLC, logLevelClients) {logLevelClients.forEach((element) {_lumberdashClients[element]?.add(keyLC);});});
Copy link
Member

Choose a reason for hiding this comment

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

Format

String logMessage(
String message, {
Map<String, String>? extras,
List<Type> exceptFor = const [],
}) {
_filterOutClientsAndLog(exceptFor, (c) => c.logMessage(message, extras));
_filterOutClientsAndLog(exceptFor, (c) => c.logMessage(message, extras), LogLevel.message);
Copy link
Member

Choose a reason for hiding this comment

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

format

  _filterOutClientsAndLog(exceptFor, (c) => c.logMessage(message, extras), LogLevel.message,);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants