.class public Lcom/esotericsoftware/minlog/Log$Logger; .super Ljava/lang/Object; .source "Log.java" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/esotericsoftware/minlog/Log; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x9 name = "Logger" .end annotation # instance fields .field private firstLogTime:J # direct methods .method public constructor ()V .locals 2 .prologue invoke-direct {p0}, Ljava/lang/Object;->()V new-instance v0, Ljava/util/Date; invoke-direct {v0}, Ljava/util/Date;->()V invoke-virtual {v0}, Ljava/util/Date;->getTime()J move-result-wide v0 iput-wide v0, p0, Lcom/esotericsoftware/minlog/Log$Logger;->firstLogTime:J return-void .end method # virtual methods .method public log(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V .locals 14 .param p1, "level" # I .param p2, "category" # Ljava/lang/String; .param p3, "message" # Ljava/lang/String; .param p4, "ex" # Ljava/lang/Throwable; .prologue new-instance v2, Ljava/lang/StringBuilder; const/16 v10, 0x100 invoke-direct {v2, v10}, Ljava/lang/StringBuilder;->(I)V .local v2, "builder":Ljava/lang/StringBuilder; new-instance v10, Ljava/util/Date; invoke-direct {v10}, Ljava/util/Date;->()V invoke-virtual {v10}, Ljava/util/Date;->getTime()J move-result-wide v10 iget-wide v12, p0, Lcom/esotericsoftware/minlog/Log$Logger;->firstLogTime:J sub-long v8, v10, v12 .local v8, "time":J const-wide/32 v10, 0xea60 div-long v4, v8, v10 .local v4, "minutes":J const-wide/16 v10, 0x3e8 div-long v10, v8, v10 const-wide/16 v12, 0x3c rem-long v6, v10, v12 .local v6, "seconds":J const-wide/16 v10, 0x9 cmp-long v10, v4, v10 if-gtz v10, :cond_0 const/16 v10, 0x30 invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; :cond_0 invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; const/16 v10, 0x3a invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; const-wide/16 v10, 0x9 cmp-long v10, v6, v10 if-gtz v10, :cond_1 const/16 v10, 0x30 invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; :cond_1 invoke-virtual {v2, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; packed-switch p1, :pswitch_data_0 :goto_0 if-eqz p2, :cond_2 const/16 v10, 0x5b invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-object/from16 v0, p2 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v10, "] " invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; :cond_2 move-object/from16 v0, p3 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; if-eqz p4, :cond_3 new-instance v3, Ljava/io/StringWriter; const/16 v10, 0x100 invoke-direct {v3, v10}, Ljava/io/StringWriter;->(I)V .local v3, "writer":Ljava/io/StringWriter; new-instance v10, Ljava/io/PrintWriter; invoke-direct {v10, v3}, Ljava/io/PrintWriter;->(Ljava/io/Writer;)V move-object/from16 v0, p4 invoke-virtual {v0, v10}, Ljava/lang/Throwable;->printStackTrace(Ljava/io/PrintWriter;)V const/16 v10, 0xa invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; invoke-virtual {v3}, Ljava/io/StringWriter;->toString()Ljava/lang/String; move-result-object v10 invoke-virtual {v10}, Ljava/lang/String;->trim()Ljava/lang/String; move-result-object v10 invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .end local v3 # "writer":Ljava/io/StringWriter; :cond_3 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v10 invoke-virtual {p0, v10}, Lcom/esotericsoftware/minlog/Log$Logger;->print(Ljava/lang/String;)V return-void :pswitch_0 const-string v10, " ERROR: " invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_0 :pswitch_1 const-string v10, " WARN: " invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_0 :pswitch_2 const-string v10, " INFO: " invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_0 :pswitch_3 const-string v10, " DEBUG: " invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_0 :pswitch_4 const-string v10, " TRACE: " invoke-virtual {v2, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_0 :pswitch_data_0 .packed-switch 0x1 :pswitch_4 :pswitch_3 :pswitch_2 :pswitch_1 :pswitch_0 .end packed-switch .end method .method protected print(Ljava/lang/String;)V .locals 1 .param p1, "message" # Ljava/lang/String; .prologue sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream; invoke-virtual {v0, p1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V return-void .end method