Skip to content

Commit 1f2e21d

Browse files
committed
log debug symbol upload
1 parent a1f5c92 commit 1f2e21d

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

src/Sentry.Unity.Editor/Android/DebugSymbolUpload.cs

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,39 +46,23 @@ private string SymbolUploadTaskFormat
4646
stringBuilder.AppendLine("afterEvaluate {");
4747
stringBuilder.AppendLine("task sentryUploadSymbols {");
4848
stringBuilder.AppendLine(" doLast {");
49-
if (_isExporting)
50-
{
51-
stringBuilder.AppendLine(" println 'Uploading symbols to Sentry.'");
52-
}
53-
else
49+
stringBuilder.AppendLine(" println 'Uploading symbols to Sentry.'");
50+
51+
if (!_isExporting && _ignoreCliErrors)
5452
{
55-
var logsDir = $"{ConvertSlashes(_unityProjectPath)}/Logs";
56-
Directory.CreateDirectory(logsDir);
57-
stringBuilder.AppendLine(" println 'Uploading symbols to Sentry. You can find the full log in ./Logs/sentry-symbols-upload.log (the file content may not be strictly sequential because it\\'s a merge of two streams).'");
58-
stringBuilder.AppendLine($" def logFilePath = '{logsDir}/{SymbolUploadLogName}'");
59-
stringBuilder.AppendLine(" def sentryLogFile = new FileOutputStream(logFilePath)");
60-
if (_ignoreCliErrors)
61-
{
62-
stringBuilder.AppendLine(" try {");
63-
}
53+
stringBuilder.AppendLine(" try {");
6454
}
6555

6656
stringBuilder.AppendLine(" exec {");
6757
stringBuilder.AppendLine(" environment 'SENTRY_PROPERTIES', './sentry.properties'");
6858
stringBuilder.AppendLine($" executable '{SentryCliMarker}'");
6959
stringBuilder.AppendLine($" args = ['debug-files', 'upload'{UploadArgsMarker}]");
70-
if (!_isExporting)
71-
{
72-
stringBuilder.AppendLine(" standardOutput sentryLogFile");
73-
stringBuilder.AppendLine(" errorOutput sentryLogFile");
74-
}
75-
7660
stringBuilder.AppendLine(" }");
61+
7762
if (!_isExporting && _ignoreCliErrors)
7863
{
7964
stringBuilder.AppendLine(" } catch (exception) {");
80-
stringBuilder.AppendLine(" def file = new File(logFilePath)");
81-
stringBuilder.AppendLine(" file.append('===ERROR===' + exception)");
65+
stringBuilder.AppendLine(" println '===ERROR===' + exception");
8266
stringBuilder.AppendLine(" }");
8367
}
8468
CheckMapping(stringBuilder);

0 commit comments

Comments
 (0)