Module: DroidAdbs::Logcat
- Defined in:
- lib/droid_adbs/commons/logcat.rb
Class Method Summary collapse
-
.clear ⇒ String
Empty string if the command is succeeded.
-
.filter_fatal_exception(logcat) ⇒ String|nil
Return a fatal exception.
-
.filter_fatal_exceptions(logcat) ⇒ Array
Return a fatal exception.
-
.get(log_level: :w) ⇒ String
Message from adb command.
-
.get_sigsegv ⇒ String
Message from adb command.
-
.save_logs_in(file_path:, log_level: :w) ⇒ String
Message from adb command.
Class Method Details
.clear ⇒ String
Returns Empty string if the command is succeeded.
5 6 7 8 9 |
# File 'lib/droid_adbs/commons/logcat.rb', line 5 def clear result = `#{::DroidAdbs.shell} logcat -c` puts result unless result.empty? result end |
.filter_fatal_exception(logcat) ⇒ String|nil
Return a fatal exception
33 34 35 |
# File 'lib/droid_adbs/commons/logcat.rb', line 33 def filter_fatal_exception(logcat) do_filter_fatal_exceptions(logcat).first end |
.filter_fatal_exceptions(logcat) ⇒ Array
Return a fatal exception
39 40 41 |
# File 'lib/droid_adbs/commons/logcat.rb', line 39 def filter_fatal_exceptions(logcat) do_filter_fatal_exceptions(logcat) end |
.get(log_level: :w) ⇒ String
Returns Message from adb command.
13 14 15 16 |
# File 'lib/droid_adbs/commons/logcat.rb', line 13 def get(log_level: :w) level = validate_log_level log_level `#{::DroidAdbs.shell} logcat -d *:#{level}`.strip end |