Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Commit

Permalink
reorg: Removed unnecessary logging_handler-dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMitterer committed Mar 26, 2018
1 parent d31e210 commit ba2b3fd
Show file tree
Hide file tree
Showing 34 changed files with 35 additions and 59 deletions.
11 changes: 0 additions & 11 deletions test/unit/config.dart
Expand Up @@ -20,8 +20,6 @@
library mdl.test.unit.config;

import 'dart:async';
import 'package:logging/logging.dart';
import 'package:logging_handlers/logging_handlers_shared.dart';
import "package:mdl/mdl.dart";

Future prepareMdlTest(Future additionalRegistration()) async {
Expand All @@ -30,12 +28,3 @@ Future prepareMdlTest(Future additionalRegistration()) async {
await componentHandler().run();
}

void configLogging({final Level defaultLogLevel: Level.OFF }) {
//hierarchicalLoggingEnabled = false; // set this to true - its part of Logging SDK

// now control the logging.
// Turn off all logging first
Logger.root.level = defaultLogLevel;
Logger.root.onRecord.listen(new LogPrintHandler());
}

2 changes: 1 addition & 1 deletion test/unit/core/MdlComponent_test.dart
Expand Up @@ -9,7 +9,7 @@ import 'package:dryice/dryice.dart' as di;
import 'package:mdl/mdl.dart';
import 'package:mdl/mdlmock.dart' as mdlmock;

//import 'package:logging/logging.dart';
import "package:console_log_handler/console_log_handler.dart";

import '../config.dart';

Expand Down
4 changes: 3 additions & 1 deletion test/unit/core/utils_test.dart
Expand Up @@ -25,6 +25,8 @@ import 'dart:html' as dom;
import "package:mdl/mdl.dart";
import 'package:dryice/dryice.dart' as di;

//import "package:console_log_handler/console_log_handler.dart";

import '../config.dart';

class MdlTestModule extends di.Module {
Expand All @@ -36,7 +38,7 @@ class MdlTestModule extends di.Module {

main() {
// final Logger _logger = new Logger("test.CoreUtils");
configLogging();
// configLogging();

final dom.DivElement div = new dom.DivElement();

Expand Down
3 changes: 1 addition & 2 deletions test/unit/directive/components/Translate_test.dart
Expand Up @@ -11,8 +11,7 @@ import '../../config.dart';

main() async {
// final Logger _logger = new Logger("test.Formatter.Button");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/flux/ActionBus_test.dart
Expand Up @@ -37,7 +37,7 @@ class TestSignal extends Action {

main() {
// final Logger _logger = new Logger("test.ActionBus");
configLogging();
// configLogging();

group('ActionBus', () {

Expand Down
2 changes: 1 addition & 1 deletion test/unit/flux/Dispatcher_test.dart
Expand Up @@ -57,7 +57,7 @@ class MyComponent {

main() {
// final Logger _logger = new Logger("test.Dispatcher");
configLogging();
// configLogging();

group('Dispatcher', () {
final ActionBus actionbus = new ActionBus();
Expand Down
3 changes: 1 addition & 2 deletions test/unit/flux/Emitter_test.dart
Expand Up @@ -16,8 +16,7 @@ class MyEmitter extends Emitter {

main() async {
// final Logger _logger = new Logger("test.Emitter");

configLogging();
// configLogging();

final MyEmitter emitter = new MyEmitter();

Expand Down
2 changes: 1 addition & 1 deletion test/unit/form/form_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() {
// final Logger _logger = new Logger("test.Form");
configLogging();
// configLogging();

final dom.FormElement form = new dom.FormElement();

Expand Down
2 changes: 1 addition & 1 deletion test/unit/formatter/Badge_test.dart
Expand Up @@ -12,7 +12,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.Formatter.Badge");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/formatter/Button_test.dart
Expand Up @@ -12,7 +12,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.Formatter.Button");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/formatter/Checkbox_test.dart
Expand Up @@ -13,7 +13,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.Formatter.Checkbox");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/formatter/Labelfield_test.dart
Expand Up @@ -12,7 +12,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.Formatter.LabelField");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/formatter/Radio_test.dart
Expand Up @@ -12,7 +12,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.Formatter.Checkbox");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/formatter/Switch_test.dart
Expand Up @@ -12,7 +12,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.Formatter.Switch");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/formatter/Textfield_test.dart
Expand Up @@ -12,7 +12,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.Formatter.Textfield");

configLogging();
// configLogging();

final DomRenderer renderer = new DomRenderer();
final dom.DivElement parent = new dom.DivElement();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mock/Mock_test.dart
Expand Up @@ -54,7 +54,7 @@ class MockModule2 extends di.Module {
main() async {
// final Logger _logger = new Logger("test.Mock");

configLogging();
// configLogging();

group('Injection', () {
setUp(() {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/observable/ObservableProperty_test.dart
Expand Up @@ -11,7 +11,7 @@ import '../config.dart';
main() async {
// final Logger _logger = new Logger("test.ObservableProperty");

configLogging();
// configLogging();
//await saveDefaultCredentials();


Expand Down
4 changes: 2 additions & 2 deletions test/unit/template/TemplateRenderer_test.dart
Expand Up @@ -13,7 +13,7 @@ import 'package:mdl/mdlmock.dart' as mdlmock;

import '../config.dart';

@MdlComponentModel
@Component
class TestComponent extends MdlTemplateComponent {
static const String WIDGET_SELECTOR = "test-component";

Expand Down Expand Up @@ -59,8 +59,8 @@ void registerTestComponent() {

main() async {
//final Logger _logger = new Logger("test.TemplateRenderer");
// configLogging();

configLogging();
final DomRenderer renderer = new DomRenderer();

group('TemplateRenderer', () {
Expand Down
3 changes: 1 addition & 2 deletions test/unit/utils/observables_test.dart
Expand Up @@ -23,8 +23,7 @@ import 'package:test/test.dart';
import "package:mdl/mdl.dart";
import "package:mdl/mdlobservable.dart";
import 'package:logging/logging.dart';

import '../config.dart';
import 'package:console_log_handler/console_log_handler.dart';

main() {
final Logger _logger = new Logger("mdl.unit.test.Observables");
Expand Down
4 changes: 1 addition & 3 deletions test/unit/utils/utils_test.dart
Expand Up @@ -23,11 +23,9 @@ import 'package:test/test.dart';

import "package:mdl/mdlutils.dart";

import '../config.dart';

main() {
// final Logger _logger = new Logger("test.DataAttribute");
configLogging();
// configLogging();

group('DataAttribute', () {
setUp(() { });
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/accordion_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Accordion");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/button_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Button");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/checkbox_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Checkbox");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/data-table_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.DataTable");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/icon_toggle_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.IconToggle");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/labelfield_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Labelfield");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/layout_test.dart
Expand Up @@ -28,7 +28,7 @@ import 'package:mdl/mdl.dart';
import '../config.dart';

main() async {
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/menu_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Menu");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/progress_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Progress");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/components/radio_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Radio");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
10 changes: 0 additions & 10 deletions test/visual/config.dart
Expand Up @@ -23,7 +23,6 @@ import 'dart:async';

import 'package:mdl/mdl.dart';
import 'package:logging/logging.dart';
import 'package:logging_handlers/logging_handlers_shared.dart';

/*
* Two ways to run these tests
Expand All @@ -43,15 +42,6 @@ import 'package:logging_handlers/logging_handlers_shared.dart';
* pub run test -p content-shell test/visual/test.dart
*/

void configLogging() {
//hierarchicalLoggingEnabled = false; // set this to true - its part of Logging SDK

// now control the logging.
// Turn off all logging first
Logger.root.level = Level.INFO;
Logger.root.onRecord.listen(new LogPrintHandler());
}

Future initComponents() async {
final Logger _logger = new Logger('mdl.test.visual.config.initComponents');

Expand Down
2 changes: 1 addition & 1 deletion test/visual/core/componenthandler_test.dart
Expand Up @@ -28,7 +28,7 @@ import '../config.dart';

main() async {
// final Logger _logger = new Logger("test.Progress");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/core/parent_test.dart
Expand Up @@ -30,7 +30,7 @@ import '../config.dart';
/// Search next MDL-Parent in MDL-Component-Tree
main() async {
// final Logger _logger = new Logger("test.Parent");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down
2 changes: 1 addition & 1 deletion test/visual/template/components/repeat_test.dart
Expand Up @@ -29,7 +29,7 @@ import '../../config.dart';

main() async {
// final Logger _logger = new Logger("test.Repeat");
configLogging();
// configLogging();

registerMdl();
await initComponents();
Expand Down

0 comments on commit ba2b3fd

Please sign in to comment.