@@ -6,8 +6,6 @@ import 'package:viam_sdk/src/gen/google/protobuf/timestamp.pb.dart';
6
6
import '../gen/app/v1/robot.pbgrpc.dart' ;
7
7
import '../gen/common/v1/common.pb.dart' ;
8
8
9
- const flutterSdkLoggerName = 'flutter-sdk' ;
10
-
11
9
/// gRPC client for connecting to app's RobotService.
12
10
///
13
11
/// All calls must be authenticated.
@@ -17,7 +15,7 @@ class AppRobotClient {
17
15
AppRobotClient (this ._client);
18
16
19
17
/// Log the OutputEvent to app with the given partId.
20
- Future <void > log (String partId, OutputEvent event) async {
18
+ Future <void > log (String partId, host, loggerName, OutputEvent event) async {
21
19
late String level;
22
20
switch (event.level) {
23
21
case Level .debug:
@@ -37,8 +35,7 @@ class AppRobotClient {
37
35
// Join lines with '\n' and suffix with '\n'.
38
36
final String message = '${event .lines .join ('\n ' )}\n ' ;
39
37
40
- final LogEntry entry =
41
- LogEntry (host: '$partId -$flutterSdkLoggerName ' , level: level, time: protoTs, loggerName: flutterSdkLoggerName, message: message);
38
+ final LogEntry entry = LogEntry (host: host, level: level, time: protoTs, loggerName: loggerName, message: message);
42
39
final request = LogRequest (id: partId, logs: [entry]);
43
40
await _client.log (request);
44
41
}
0 commit comments