Skip to content

Commit

Permalink
Added log on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriano Santos committed Oct 15, 2023
1 parent 4d3a4b0 commit ad089a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Service {
_logger.d("Received Actor Invocation Request: $actorInvocationRequest");

ActorInvocationResponse response = ActorInvocationResponse.create()
..actorName = 'test';
..actorName = actorInvocationRequest.actor.name;

Uint8List actorInvocationResp = response.writeToBuffer();

Expand Down
6 changes: 4 additions & 2 deletions lib/src/spawn_dart_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import 'package:shelf/shelf_io.dart' as shelf_io;
import 'package:spawn_dart/src/service.dart';

class SpawnSystem {
final _logger = Logger(
static final _logger = Logger(
filter: SpawnLogFilter(),
printer: LogfmtPrinter(),
output: SimpleConsoleOutput(),
);

final _watch = Stopwatch();
Expand All @@ -34,7 +36,7 @@ class SpawnSystem {
serverPort,
);

print('Serving at http://${server.address.host}:${server.port}');
_logger.i('Serving at http://${server.address.host}:${server.port}');

// Used for tracking uptime of the server.
_watch.start();
Expand Down

0 comments on commit ad089a4

Please sign in to comment.