log method
Log a message
Implementation
@override
void log(String channel, String message) async {
final timestamp = DateTime.now();
try {
await http.post(
baseUrl.resolve('/log'),
headers: {
'Content-Type': 'application/json',
},
body: json.encode({
'channel': channel,
'timestamp': '$timestamp',
'message': message,
}),
);
} catch (e) {
debugPrint('[RemoteLogger] error: $e');
}
}