启动appium server时打印日志时间
Posted 博琴雅心
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了启动appium server时打印日志时间相关的知识,希望对你有一定的参考价值。
在调试脚本的时候想看查找元素和执行命令花了多少时间,我们可以在启动appium server的时候加上启动参数,实现我们的需求。
1)输入:appium h,可以查看appium提供的启动参数有哪些。
2)我需要在启动的时候打印时间,方便我查看查找和执行动作花费的时间,输入:appium --log-timestamp,执行的所以日志都会把时间数据都打印出来。
appium h
usage: /usr/local/bin/appium [-h] [-v] [--shell] [--allow-cors] [--reboot]
[--ipa IPA] [-a ADDRESS] [-p PORT] [-pa BASEPATH]
[-ca CALLBACKADDRESS] [-cp CALLBACKPORT]
[-bp BOOTSTRAPPORT] [-r BACKENDRETRIES]
[--session-override] [-l] [-g LOGFILE]
[--log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}]
[--log-timestamp] [--local-timezone]
[--log-no-colors] [-G WEBHOOK] [--safari]
[--default-device] [--force-iphone]
[--force-ipad]
[--tracetemplate AUTOMATIONTRACETEMPLATEPATH]
[--instruments INSTRUMENTSPATH]
[--nodeconfig NODECONFIG] [-ra ROBOTADDRESS]
[-rp ROBOTPORT]
[--chromedriver-port CHROMEDRIVERPORT]
[--chromedriver-executable CHROMEDRIVEREXECUTABLE]
[--show-config] [--no-perms-check]
[--strict-caps] [--isolate-sim-device]
[--tmp TMPDIR] [--trace-dir TRACEDIR]
[--debug-log-spacing]
[--suppress-adb-kill-server] [--long-stacktrace]
[--webkit-debug-proxy-port WEBKITDEBUGPROXYPORT]
[--webdriveragent-port WDALOCALPORT]
[-dc DEFAULTCAPABILITIES] [--relaxed-security]
[--allow-insecure ALLOWINSECURE]
[--deny-insecure DENYINSECURE]
[--command-timeout DEFAULTCOMMANDTIMEOUT] [-k]
[--platform-name PLATFORMNAME]
[--platform-version PLATFORMVERSION]
[--automation-name AUTOMATIONNAME]
[--device-name DEVICENAME]
[--browser-name BROWSERNAME] [--app APP]
[-lt LAUNCHTIMEOUT] [--language LANGUAGE]
[--locale LOCALE] [-U UDID]
[--orientation ORIENTATION] [--no-reset]
[--full-reset] [--app-pkg APPPACKAGE]
[--app-activity APPACTIVITY]
[--app-wait-package APPWAITPACKAGE]
[--app-wait-activity APPWAITACTIVITY]
[--device-ready-timeout DEVICEREADYTIMEOUT]
[--android-coverage ANDROIDCOVERAGE] [--avd AVD]
[--avd-args AVDARGS] [--use-keystore]
[--keystore-path KEYSTOREPATH]
[--keystore-password KEYSTOREPASSWORD]
[--key-alias KEYALIAS]
[--key-password KEYPASSWORD]
[--intent-action INTENTACTION]
[--intent-category INTENTCATEGORY]
[--intent-flags INTENTFLAGS]
[--intent-args OPTIONALINTENTARGUMENTS]
[--dont-stop-app-on-reset]
[--calendar-format CALENDARFORMAT]
[--native-instruments-lib] [--keep-keychains]
[--localizable-strings-dir LOCALIZABLESTRINGSDIR]
[--show-ios-log] [--async-trace]
/usr/local/bin/appium: error: Unrecognized arguments: h.
jihaiqingdeMacBook-Pro:~ yoshiumijou$ appium --log-timestamp
2020-05-25 03:22:49:439 - [Appium] Welcome to Appium v1.16.0
2020-05-25 03:22:49:441 - [Appium] Non-default server args:
2020-05-25 03:22:49:441 - [Appium] logTimestamp: true
2020-05-25 03:22:49:458 - [Appium] Appium REST http interface listener started on 0.0.0.0:4723
!-- p.p1>以上是关于启动appium server时打印日志时间的主要内容,如果未能解决你的问题,请参考以下文章