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 {
|
main() async {
|
||||||
// Watch the config/ and web/ directories for changes, and hot-reload the server.
|
// Watch the config/ and web/ directories for changes, and hot-reload the server.
|
||||||
var hot = new HotReloader(() async {
|
hierarchicalLoggingEnabled = true;
|
||||||
var app = new Angel(reflector: MirrorsReflector());
|
|
||||||
|
var hot = HotReloader(() async {
|
||||||
|
var logger = Logger.detached('{{angel}}')..onRecord.listen(prettyLog);
|
||||||
|
var app = Angel(logger: logger, reflector: MirrorsReflector());
|
||||||
await app.configure(configureServer);
|
await app.configure(configureServer);
|
||||||
hierarchicalLoggingEnabled = true;
|
|
||||||
app.logger = new Logger.detached('{{angel}}')..onRecord.listen(prettyLog);
|
|
||||||
return app;
|
return app;
|
||||||
}, [
|
}, [
|
||||||
new Directory('config'),
|
Directory('config'),
|
||||||
new Directory('lib'),
|
Directory('lib'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var server = await hot.startServer('127.0.0.1', 3000);
|
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