Skip to content

Commit 799761a

Browse files
authored
Minor logging changes (#225)
A few small logging changes to align better with how the server interacts with the SDK in some cases. The most notable is that when we discover services we don't always "register" them (in dry-run mode) so that SDK should just log that it's announcing those services instead. Additionally. Using the word "registering" in logs might confuse users as it's not registering those services to restate server but rather just binding those services on the open port.
1 parent 68f58bf commit 799761a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/server/base_restate_server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export abstract class BaseRestateServer {
150150
);
151151
// note that this log will not print all the keys.
152152
rlog.info(
153-
`Registering: ${url} -> ${JSON.stringify(method, null, "\t")}`
153+
`Binding: ${url} -> ${JSON.stringify(method, null, "\t")}`
154154
);
155155
}
156156
}
@@ -264,7 +264,7 @@ export abstract class BaseRestateServer {
264264
) as HostedGrpcServiceMethod<unknown, unknown>;
265265

266266
rlog.info(
267-
`Registering: ${url} -> ${JSON.stringify(
267+
`Binding: ${url} -> ${JSON.stringify(
268268
registration.method,
269269
null,
270270
"\t"

src/server/restate_lambda_handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export class LambdaRestateServer extends BaseRestateServer {
259259
private handleDiscovery(): APIGatewayProxyResult | APIGatewayProxyResultV2 {
260260
// return discovery information
261261
rlog.info(
262-
"Answering discovery request. Registering these services: " +
262+
"Answering discovery request. Announcing services: " +
263263
JSON.stringify(this.discovery.services)
264264
);
265265
return {

src/server/restate_server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class RestateServer extends BaseRestateServer {
177177
// no method under that name. might be a discovery request
178178
if (url.path == "/discover") {
179179
rlog.info(
180-
"Answering discovery request. Registering these services: " +
180+
"Answering discovery request. Announcing services: " +
181181
JSON.stringify(this.discovery.services)
182182
);
183183
await respondDiscovery(this.discovery, stream);

0 commit comments

Comments
 (0)