Update examples to use lumberjack
This commit is contained in:
parent
803f446a01
commit
8d80eab5bd
4 changed files with 15 additions and 11 deletions
|
@ -3,11 +3,12 @@ import 'dart:io';
|
|||
import 'package:angel_container/mirrors.dart';
|
||||
import 'package:angel_framework/angel_framework.dart';
|
||||
import 'package:angel_framework/http.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:lumberjack/lumberjack.dart';
|
||||
import 'package:lumberjack/io.dart';
|
||||
|
||||
main() async {
|
||||
var app = new Angel(reflector: MirrorsReflector())
|
||||
..logger = (new Logger('angel')..onRecord.listen(print))
|
||||
..logger = (new Logger('angel')..pipe(new AnsiLogPrinter.toStdout()))
|
||||
..encoders.addAll({'gzip': gzip.encoder});
|
||||
|
||||
app.fallback(
|
||||
|
|
|
@ -3,12 +3,13 @@ import 'package:angel_framework/angel_framework.dart';
|
|||
import 'package:angel_framework/http.dart';
|
||||
import 'package:angel_framework/http2.dart';
|
||||
import 'package:file/local.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'pretty_logging.dart';
|
||||
import 'package:lumberjack/lumberjack.dart';
|
||||
import 'package:lumberjack/io.dart';
|
||||
|
||||
main() async {
|
||||
var app = new Angel();
|
||||
app.logger = new Logger('angel')..onRecord.listen(prettyLog);
|
||||
app.logger = new Logger('angel');
|
||||
app.logger.pipe(new AnsiLogPrinter.toStdout());
|
||||
|
||||
var publicDir = new Directory('example/public');
|
||||
var indexHtml =
|
||||
|
|
|
@ -2,8 +2,8 @@ import 'dart:io';
|
|||
import 'package:angel_framework/angel_framework.dart';
|
||||
import 'package:angel_framework/http.dart';
|
||||
import 'package:angel_framework/http2.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'pretty_logging.dart';
|
||||
import 'package:lumberjack/lumberjack.dart';
|
||||
import 'package:lumberjack/io.dart';
|
||||
|
||||
main() async {
|
||||
var app = new Angel()
|
||||
|
@ -11,7 +11,8 @@ main() async {
|
|||
'gzip': gzip.encoder,
|
||||
'deflate': zlib.encoder,
|
||||
});
|
||||
app.logger = new Logger('angel')..onRecord.listen(prettyLog);
|
||||
app.logger = new Logger('angel');
|
||||
app.logger.pipe(new AnsiLogPrinter.toStdout());
|
||||
|
||||
app.get('/', (req, res) => 'Hello HTTP/2!!!');
|
||||
|
||||
|
|
|
@ -3,12 +3,13 @@ import 'package:angel_framework/angel_framework.dart';
|
|||
import 'package:angel_framework/http.dart';
|
||||
import 'package:angel_framework/http2.dart';
|
||||
import 'package:file/local.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'pretty_logging.dart';
|
||||
import 'package:lumberjack/lumberjack.dart';
|
||||
import 'package:lumberjack/io.dart';
|
||||
|
||||
main() async {
|
||||
var app = new Angel();
|
||||
app.logger = new Logger('angel')..onRecord.listen(prettyLog);
|
||||
app.logger = new Logger('angel');
|
||||
app.logger.pipe(new AnsiLogPrinter.toStdout());
|
||||
|
||||
var publicDir = new Directory('example/http2/public');
|
||||
var indexHtml =
|
||||
|
|
Loading…
Reference in a new issue