Linus Nilsson | af4a321 | 2020-12-15 08:18:25 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [ $# -ne 1 ] |
| 4 | then |
| 5 | echo Usage: $0 loglevel |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
| 9 | level=$1 |
| 10 | echo Setting transcoder log level to $level |
| 11 | |
| 12 | # List all log tags |
| 13 | declare -a tags=( |
| 14 | MediaTranscoder MediaTrackTranscoder VideoTrackTranscoder PassthroughTrackTranscoder |
| 15 | MediaSampleWriter MediaSampleReader MediaSampleQueue MediaTranscoderTests |
| 16 | MediaTrackTranscoderTests VideoTrackTranscoderTests PassthroughTrackTranscoderTests |
| 17 | MediaSampleWriterTests MediaSampleReaderNDKTests MediaSampleQueueTests) |
| 18 | |
| 19 | # Set log level for all tags |
| 20 | for tag in "${tags[@]}" |
| 21 | do |
| 22 | adb shell setprop log.tag.${tag} $level |
| 23 | done |
| 24 | |
| 25 | # Pick up new settings |
| 26 | adb shell stop && adb shell start |