File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
app/src/main/java/com/termux/tasker Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 22
33import android .app .Application ;
44import android .content .Context ;
5+ import android .util .Log ;
56
67import com .termux .shared .logger .Logger ;
78import com .termux .shared .termux .TermuxConstants ;
1011
1112public class TermuxTaskerApplication extends Application {
1213
14+ public static final String LOG_TAG = "TermuxTaskerApplication" ;
15+
1316 public void onCreate () {
1417 super .onCreate ();
1518
19+ Log .i (LOG_TAG , "AppInit" );
20+
1621 Context context = getApplicationContext ();
1722
1823 // Set crash handler for the app
19- TermuxCrashUtils .setCrashHandler (this );
24+ TermuxCrashUtils .setCrashHandler (context );
2025
2126 // Set log config for the app
2227 setLogConfig (context , true );
23-
24- Logger .logDebug ("Starting Application" );
2528 }
2629
2730 public static void setLogConfig (Context context , boolean commitToFile ) {
28- Logger .setDefaultLogTag (TermuxConstants .TERMUX_TASKER_APP_NAME .replaceAll (": " , "" ));
31+ Logger .setDefaultLogTag (TermuxConstants .TERMUX_TASKER_APP_NAME .replaceAll ("[: ] " , "" ));
2932
3033 // Load the log level from shared preferences and set it to the Logger.CURRENT_LOG_LEVEL
3134 TermuxTaskerAppSharedPreferences preferences = TermuxTaskerAppSharedPreferences .build (context );
Original file line number Diff line number Diff line change 1414import com .termux .shared .termux .theme .TermuxThemeUtils ;
1515import com .termux .shared .theme .NightMode ;
1616import com .termux .tasker .R ;
17+ import com .termux .tasker .TermuxTaskerApplication ;
1718
1819public class TermuxTaskerMainActivity extends AppCompatActivity {
1920
@@ -40,6 +41,9 @@ protected void onCreate(Bundle savedInstanceState) {
4041 protected void onResume () {
4142 super .onResume ();
4243
44+ // Set log level for the app
45+ TermuxTaskerApplication .setLogConfig (this , false );
46+
4347 Logger .logVerbose (LOG_TAG , "onResume" );
4448
4549 setChangeLauncherActivityStateViews ();
You can’t perform that action at this time.
0 commit comments