Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add java option -Dauthlibinjector.logFile to customize the path of log file #206

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chuanwise
Copy link

No description provided.

import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.*;
Copy link
Owner

Choose a reason for hiding this comment

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

不要使用通配符导入


-Dauthlibinjector.logFile
指定日志文件输出位置.
可以填写绝对路径,也可以填写相对路径。
Copy link
Owner

Choose a reason for hiding this comment

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

标点请用英文半角。此外,请修改对应的英文readme。

if (logFileProperty == null) {
logfilePath = Paths.get("authlib-injector.log").toAbsolutePath();
} else {
logfilePath = new File(logFileProperty).toPath().toAbsolutePath();
Copy link
Owner

Choose a reason for hiding this comment

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

不要使用 new File(...).toPath(),直接使用 Paths.get(...) 即可

@@ -36,8 +36,12 @@ gradle
开启此选项后, 日志仅会输出到控制台.

需要注意的是, authlib-injector 的日志是不会输出到 Minecraft 服务端/客户端的日志文件中的.

Copy link
Owner

Choose a reason for hiding this comment

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

不要编辑无关行。

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.

None yet

2 participants