Skip to content

Commit

Permalink
Only one example
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed May 13, 2023
1 parent 3257b1a commit 556a5c4
Show file tree
Hide file tree
Showing 72 changed files with 39 additions and 81 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ deploy:
coverage: get
@dart test --concurrency=6 --platform vm --coverage=coverage test/
@dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib
#@mv coverage/lcov.info coverage/lcov.base.info
#@lcov -r coverage/lcov.base.info -o coverage/lcov.base.info "lib/**.freezed.dart" "lib/**.g.dart"
#@mv coverage/lcov.base.info coverage/lcov.info
# @mv coverage/lcov.info coverage/lcov.base.info
# @lcov -r coverage/lcov.base.info -o coverage/lcov.base.info "lib/**.freezed.dart" "lib/**.g.dart"
# @mv coverage/lcov.base.info coverage/lcov.info
@lcov --list coverage/lcov.info
@genhtml -o coverage coverage/lcov.info
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions example/console_example/integration.dart

This file was deleted.

36 changes: 0 additions & 36 deletions example/console_example/zoned.dart

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 27 additions & 8 deletions example/flutter_example/lib/main.dart → example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
// ignore_for_file: public_member_api_docs, avoid_print
library l.example;

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:l/l.dart';

void main() => runZonedGuarded(
() => l.capture(() {
l.d('runApp');
print('original print');
runApp(const App());
l.v('Running');
return null;
}),
void main() => runZonedGuarded<void>(
() => l.capture<void>(
() {
l
..v('Regular 1')
..e('Error')
..w('Warning')
..i('Info')
..d('Debug')
..s('Shout')
..v6('Regular 6');
print('Hello from original print!');
runApp(const App());
l.v('Running');
},
const LogOptions(
handlePrint: true,
messageFormatting: _messageFormatting,
),
),
l.e,
);

Object _messageFormatting(Object message, LogLevel logLevel, DateTime now) =>
'${_timeFormat(now)} | $message';

String _timeFormat(DateTime time) =>
'${time.hour}:${time.minute.toString().padLeft(2, '0')}';

@immutable
class App extends StatelessWidget {
const App({
Expand Down
14 changes: 0 additions & 14 deletions example/main.dart

This file was deleted.

10 changes: 6 additions & 4 deletions example/flutter_example/pubspec.yaml → example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: l_flutter_example
description: Flutter [L]ogger example
description: Flutter Logger example
version: 1.0.0+1
repository: https://github.com/PlugFox/l/tree/master
issue_tracker: https://github.com/PlugFox/l/issues
homepage: https://github.com/PlugFox/l

publish_to: 'none'

version: 1.0.0+1

environment:
sdk: '>=3.0.0'
flutter: '>=3.0.0'
Expand All @@ -13,7 +15,7 @@ dependencies:
flutter:
sdk: flutter
l:
path: '../../'
path: '../'

flutter:
uses-material-design: true
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ description: >
Manipulate with native and web console.
Support ascii colorize output.
version: 4.0.0
repository: https://github.com/plugfox/l/tree/master
issue_tracker: https://github.com/plugfox/l/issues
homepage: https://github.com/plugfox/l
repository: https://github.com/PlugFox/l/tree/master
issue_tracker: https://github.com/PlugFox/l/issues
homepage: https://github.com/PlugFox/l
#publish_to: https://pub.dev
#documentation: https://pub.dev/documentation/l/latest/
#authors:
Expand Down

0 comments on commit 556a5c4

Please sign in to comment.