serverLog.dart 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'dart:core';
  2. import '../client_base.dart';
  3. class ServerLogService extends JsonRpcClientBase {
  4. ServerLogService(
  5. String host, {
  6. String serviceName = "IServerLogService",
  7. Map<String, String>? headers,
  8. int? timeout,
  9. }) : super(
  10. host,
  11. serviceName,
  12. headers: headers,
  13. timeout: timeout,
  14. );
  15. Future<bool> writeInfoAsync(String serviceName, String module,
  16. String requestChain, String logContent) async {
  17. var rpcRst = await call(
  18. "WriteInfoAsync", [serviceName, module, requestChain, logContent]);
  19. return rpcRst;
  20. }
  21. Future<bool> writeWarnAsync(String serviceName, String module,
  22. String requestChain, String logContent) async {
  23. var rpcRst = await call(
  24. "WriteWarnAsync", [serviceName, module, requestChain, logContent]);
  25. return rpcRst;
  26. }
  27. Future<bool> writeErrorAsync(String serviceName, String module,
  28. String requestChain, String logContent) async {
  29. var rpcRst = await call(
  30. "WriteErrorAsync", [serviceName, module, requestChain, logContent]);
  31. return rpcRst;
  32. }
  33. }