logError function

Future<void> logError(
  1. String buildJobId,
  2. String runId,
  3. String message, {
  4. String? stackTrace,
})

Implementation

Future<void> logError(
  String buildJobId,
  String runId,
  String message, {
  String? stackTrace,
}) async {
  _log.severe(message);
  if (stackTrace != null) {
    _log.severe('Stack trace: $stackTrace');
  }
  await writeBuildLog(
    buildJobId,
    runId,
    LogLevel.error,
    message,
    stackTrace: stackTrace,
  );
}