mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-22 16:56:16 +00:00
Renamed --debug-telegram to --trace-telegram and added --trace, while --debug now shows only log entries up to DEBUG level.
This commit is contained in:
parent
dfd714e481
commit
8f5a9a9ad5
@ -222,7 +222,8 @@ public class CommandLineController {
|
|||||||
System.out.println(" -a, --account <x> Use account <x>.");
|
System.out.println(" -a, --account <x> Use account <x>.");
|
||||||
System.out.println(" -l, --login Login to an existing telegram account.");
|
System.out.println(" -l, --login Login to an existing telegram account.");
|
||||||
System.out.println(" --debug Shows some debug information.");
|
System.out.println(" --debug Shows some debug information.");
|
||||||
System.out.println(" --debug-telegram Shows lots of debug messages from the library used to access Telegram.");
|
System.out.println(" --trace Shows lots of debug information. Overrides --debug.");
|
||||||
|
System.out.println(" --trace-telegram Shows lots of debug messages from the library used to access Telegram.");
|
||||||
System.out.println(" -A, --list-accounts List all existing accounts ");
|
System.out.println(" -A, --list-accounts List all existing accounts ");
|
||||||
System.out.println(" --limit-messages <x> Downloads at most the most recent <x> messages.");
|
System.out.println(" --limit-messages <x> Downloads at most the most recent <x> messages.");
|
||||||
System.out.println(" --no-media Do not download media files.");
|
System.out.println(" --no-media Do not download media files.");
|
||||||
|
@ -21,7 +21,8 @@ class CommandLineOptions {
|
|||||||
public static boolean cmd_help = false;
|
public static boolean cmd_help = false;
|
||||||
public static boolean cmd_login = false;
|
public static boolean cmd_login = false;
|
||||||
public static boolean cmd_debug = false;
|
public static boolean cmd_debug = false;
|
||||||
public static boolean cmd_debug_telegram = false;
|
public static boolean cmd_trace = false;
|
||||||
|
public static boolean cmd_trace_telegram = false;
|
||||||
public static boolean cmd_list_accounts = false;
|
public static boolean cmd_list_accounts = false;
|
||||||
public static boolean cmd_version = false;
|
public static boolean cmd_version = false;
|
||||||
public static boolean cmd_license = false;
|
public static boolean cmd_license = false;
|
||||||
@ -68,8 +69,11 @@ class CommandLineOptions {
|
|||||||
case "--debug":
|
case "--debug":
|
||||||
cmd_debug = true; break;
|
cmd_debug = true; break;
|
||||||
|
|
||||||
case "--debug-telegram":
|
case "--trace":
|
||||||
cmd_debug_telegram = true; break;
|
cmd_trace = true; break;
|
||||||
|
|
||||||
|
case "--trace-telegram":
|
||||||
|
cmd_trace_telegram = true; break;
|
||||||
|
|
||||||
case "-A": case "--list-accounts":
|
case "-A": case "--list-accounts":
|
||||||
cmd_list_accounts = true; break;
|
cmd_list_accounts = true; break;
|
||||||
|
@ -50,10 +50,13 @@ public class CommandLineRunner {
|
|||||||
rootLogger.addAppender(appender);
|
rootLogger.addAppender(appender);
|
||||||
rootLogger.setLevel(Level.OFF);
|
rootLogger.setLevel(Level.OFF);
|
||||||
|
|
||||||
if (CommandLineOptions.cmd_debug) {
|
if (CommandLineOptions.cmd_trace) {
|
||||||
((Logger)LoggerFactory.getLogger("de.fabianonline.telegram_backup")).setLevel(Level.TRACE);
|
((Logger)LoggerFactory.getLogger("de.fabianonline.telegram_backup")).setLevel(Level.TRACE);
|
||||||
|
} else if (CommandLineOptions.cmd_debug) {
|
||||||
|
((Logger)LoggerFactory.getLogger("de.fabianonline.telegram_backup")).setLevel(Level.DEBUG);
|
||||||
}
|
}
|
||||||
if (CommandLineOptions.cmd_debug_telegram) {
|
|
||||||
|
if (CommandLineOptions.cmd_trace_telegram) {
|
||||||
((Logger)LoggerFactory.getLogger("com.github.badoualy")).setLevel(Level.TRACE);
|
((Logger)LoggerFactory.getLogger("com.github.badoualy")).setLevel(Level.TRACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user