Edit bin/dev.dart for logging logic
This commit is contained in:
parent
14da50550e
commit
7773303a07
1 changed files with 9 additions and 7 deletions
16
bin/dev.dart
16
bin/dev.dart
|
@ -8,17 +8,19 @@ import 'package:logging/logging.dart';
|
|||
|
||||
main() async {
|
||||
// Watch the config/ and web/ directories for changes, and hot-reload the server.
|
||||
var hot = new HotReloader(() async {
|
||||
var app = new Angel(reflector: MirrorsReflector());
|
||||
hierarchicalLoggingEnabled = true;
|
||||
|
||||
var hot = HotReloader(() async {
|
||||
var logger = Logger.detached('{{angel}}')..onRecord.listen(prettyLog);
|
||||
var app = Angel(logger: logger, reflector: MirrorsReflector());
|
||||
await app.configure(configureServer);
|
||||
hierarchicalLoggingEnabled = true;
|
||||
app.logger = new Logger.detached('{{angel}}')..onRecord.listen(prettyLog);
|
||||
return app;
|
||||
}, [
|
||||
new Directory('config'),
|
||||
new Directory('lib'),
|
||||
Directory('config'),
|
||||
Directory('lib'),
|
||||
]);
|
||||
|
||||
var server = await hot.startServer('127.0.0.1', 3000);
|
||||
print('{{angel}} server listening at http://${server.address.address}:${server.port}');
|
||||
print(
|
||||
'{{angel}} server listening at http://${server.address.address}:${server.port}');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue