Skip to content

Conversation

jasonjiang9527
Copy link
Contributor

@jasonjiang9527 jasonjiang9527 commented Dec 24, 2021

fix #1617

Change list

avoid chinese garbled characters

Types of changes

What types of changes are you proposing/introducing to Java client?
Put an x in the boxes that apply

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

details #1617

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 24, 2021

CLA Signed

The committers are authorized under a signed CLA.

@@ -410,16 +411,15 @@ static Slf4jLogMessageContext parseSlf4jContextFromLogMessage(String logMessage)
public void addLogMessageConsumer(Consumer<String> consumer) {
checkNotNull(consumer, "consumer parameter is NULL!");
addOutPutStream(new OutputStream() {
StringBuilder lineBuilder = new StringBuilder();
private ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the property be final?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes , final is better

@mykola-mokhnach
Copy link
Contributor

Could you please sign the CLA?

@jasonjiang9527
Copy link
Contributor Author

will CLA affect my pr?

@mykola-mokhnach
Copy link
Contributor

I cannot merge it without CLA being signed

@jasonjiang9527
Copy link
Contributor Author

👌i will do this later

@mykola-mokhnach mykola-mokhnach merged commit 1c28134 into appium:master Dec 27, 2021
@rishikhanna1401
Copy link

@mykola-mokhnach I am facing issue with latest java-client to launch appium service. Does anything changed around this?

While trying to programmatically open appium server using java-client 8.0.0 I see below error msg:

io.appium.java_client.service.local.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started. The given Node.js executable: /usr/local/bin/appium Arguments: [/usr/local/lib/node_modules/appium/lib/appium.js, --port, 18384, --address, 0.0.0.0]
Process output: usage: /usr/local/lib/node_modules/appium/build/lib/main.js
[-h] [–shell] [–allow-cors] [–reboot] [–ipa IPA] [-a ADDRESS]
[-p PORT] [-pa BASEPATH] [-ka KEEPALIVETIMEOUT] [-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-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] [–chromedriver-port CHROMEDRIVERPORT]
[–log-filters LOGFILTERS] [-v]
/usr/local/lib/node_modules/appium/build/lib/main.js: error: unrecognized arguments: /usr/local/lib/node_modules/appium/lib/appium.js

Sample Start-up code(worked on java-client 8.0.0-beta version:

service = AppiumDriverLocalService
.buildService(new AppiumServiceBuilder()
.usingDriverExecutable(new File("/usr/local/bin/appium"))
.withAppiumJS(
new File(
“/usr/local/lib/node_modules/appium/lib/appium.js”))
.usingPort(port));
service.start();

Appium Version Used: 1.20.0 and 1.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AppiumDriverLocalService.addLogMessageConsumer(Consumer<String>) supply garbled characters in chinese words , 中文字符乱码
4 participants