Rabbit-R1/switch port/smali/smali_classes3/io/sentry/SystemOutLogger.smali

177 lines
4.2 KiB
Smali
Raw Normal View History

2024-05-21 16:08:36 -05:00
.class public final Lio/sentry/SystemOutLogger;
.super Ljava/lang/Object;
.source "SystemOutLogger.java"
# interfaces
.implements Lio/sentry/ILogger;
# direct methods
.method public constructor <init>()V
.locals 0
.line 9
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private captureStackTrace(Ljava/lang/Throwable;)Ljava/lang/String;
.locals 1
.line 84
new-instance p0, Ljava/io/StringWriter;
invoke-direct {p0}, Ljava/io/StringWriter;-><init>()V
.line 85
new-instance v0, Ljava/io/PrintWriter;
invoke-direct {v0, p0}, Ljava/io/PrintWriter;-><init>(Ljava/io/Writer;)V
.line 86
invoke-virtual {p1, v0}, Ljava/lang/Throwable;->printStackTrace(Ljava/io/PrintWriter;)V
.line 87
invoke-virtual {p0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
# virtual methods
.method public isEnabled(Lio/sentry/SentryLevel;)Z
.locals 0
const/4 p0, 0x1
return p0
.end method
.method public log(Lio/sentry/SentryLevel;Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 2
if-nez p3, :cond_0
const/4 p3, 0x0
new-array p3, p3, [Ljava/lang/Object;
.line 41
invoke-virtual {p0, p1, p2, p3}, Lio/sentry/SystemOutLogger;->log(Lio/sentry/SentryLevel;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_0
.line 43
:cond_0
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
.line 46
invoke-virtual {p3}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
move-result-object v1
filled-new-array {v1}, [Ljava/lang/Object;
move-result-object v1
invoke-static {p2, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
invoke-direct {p0, p3}, Lio/sentry/SystemOutLogger;->captureStackTrace(Ljava/lang/Throwable;)Ljava/lang/String;
move-result-object p0
filled-new-array {p1, p2, p0}, [Ljava/lang/Object;
move-result-object p0
const-string p1, "%s: %s\n%s"
.line 44
invoke-static {p1, p0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
.line 43
invoke-virtual {v0, p0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
:goto_0
return-void
.end method
.method public varargs log(Lio/sentry/SentryLevel;Ljava/lang/String;[Ljava/lang/Object;)V
.locals 0
.line 24
sget-object p0, Ljava/lang/System;->out:Ljava/io/PrintStream;
invoke-static {p2, p3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
filled-new-array {p1, p2}, [Ljava/lang/Object;
move-result-object p1
const-string p2, "%s: %s"
invoke-static {p2, p1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p0, p1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method
.method public varargs log(Lio/sentry/SentryLevel;Ljava/lang/Throwable;Ljava/lang/String;[Ljava/lang/Object;)V
.locals 1
if-nez p2, :cond_0
.line 66
invoke-virtual {p0, p1, p3, p4}, Lio/sentry/SystemOutLogger;->log(Lio/sentry/SentryLevel;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_0
.line 68
:cond_0
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
.line 72
invoke-static {p3, p4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p3
.line 73
invoke-virtual {p2}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
move-result-object p4
.line 74
invoke-direct {p0, p2}, Lio/sentry/SystemOutLogger;->captureStackTrace(Ljava/lang/Throwable;)Ljava/lang/String;
move-result-object p0
filled-new-array {p1, p3, p4, p0}, [Ljava/lang/Object;
move-result-object p0
const-string p1, "%s: %s \n %s\n%s"
.line 69
invoke-static {p1, p0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
.line 68
invoke-virtual {v0, p0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
:goto_0
return-void
.end method