Skip to content

Commit 0d25164

Browse files
committed
[update] よくわかんないから一回ログの数を増やしてみる
1 parent 9da7215 commit 0d25164

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

core/src/main/java/com/rtm516/mcxboxbroadcast/core/SessionManager.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,20 @@ public void createSession(SessionInfo sessionInfo) throws SessionCreationExcepti
137137
*/
138138
private void createSession() throws SessionCreationException, SessionUpdateException {
139139
// Get the token for authentication
140+
logger.info("トークンを取得します");
140141
XboxTokenInfo tokenInfo = getXboxToken();
141142
String token = tokenInfo.tokenHeader();
142143

143144
// Update the current session infos XUID
145+
logger.info("XUIDを設定します");
144146
this.sessionInfo.setXuid(tokenInfo.userXUID);
145147

146148
// Create the RTA websocket connection
149+
logger.info("ウェブソケットを構築します");
147150
setupWebsocket(token);
148151

149152
// Wait and get the connection ID from the websocket
153+
logger.info("コネクションIDを待機します");
150154
String connectionId;
151155
try {
152156
connectionId = waitForConnectionId().get();
@@ -155,12 +159,15 @@ private void createSession() throws SessionCreationException, SessionUpdateExcep
155159
}
156160

157161
// Update the current session infos connection ID
162+
logger.info("コネクションIDを設定します");
158163
this.sessionInfo.setConnectionId(connectionId);
159164

160165
// Push the session information to the session directory
166+
logger.info("セッションを更新します");
161167
updateSession();
162168

163169
// Create the session handle request
170+
logger.info("セッションハンドルリクエストを作成します");
164171
CreateHandleRequest createHandleContent = new CreateHandleRequest(
165172
1,
166173
"activity",
@@ -172,6 +179,7 @@ private void createSession() throws SessionCreationException, SessionUpdateExcep
172179
);
173180

174181
// Make the request to create the session handle
182+
logger.info("セッションハンドルの作成を要求します");
175183
HttpRequest createHandleRequest;
176184
try {
177185
createHandleRequest = HttpRequest.newBuilder()
@@ -186,6 +194,7 @@ private void createSession() throws SessionCreationException, SessionUpdateExcep
186194
}
187195

188196
// Read the handle response
197+
logger.info("セッションハンドルのレスポンスを取得します");
189198
HttpResponse<String> createHandleResponse;
190199
try {
191200
createHandleResponse = httpClient.send(createHandleRequest, HttpResponse.BodyHandlers.ofString());
@@ -194,6 +203,7 @@ private void createSession() throws SessionCreationException, SessionUpdateExcep
194203
}
195204

196205
// Check to make sure the handle was created
206+
logger.info("セッションハンドルの作成を確認します");
197207
if (createHandleResponse.statusCode() != 200 && createHandleResponse.statusCode() != 201) {
198208
throw new SessionCreationException("Unable to create session handle, got status " + createHandleResponse.statusCode() + " trying to create");
199209
}

0 commit comments

Comments
 (0)