#33 Log flag and logs refactoring

Merged
jonathan merged 26 commits from kris/log_flag into master 4 years ago
kris commented 4 years ago
There is no content yet.
jonathan requested changes 4 years ago
jonathan left a comment

Overall looks very good. Just a few suggestions and one big question -- how do the supervisord changes take effect?

@@ -1,7 +1,6 @@
*.iml
.idea
tmp
logs
jonathan commented 4 years ago

why remove this from .gitignore?

why remove this from .gitignore?
kris commented 4 years ago

This shouldn’t be created any more - the only files written in here are 2 bubble and 2 nodemanager logs. Removing it here would be another confirmation to me that I fully removed the usage of this folder.

This shouldn't be created any more - the only files written in here are 2 bubble and 2 nodemanager logs. Removing it here would be another confirmation to me that I fully removed the usage of this folder.
@@ -201,6 +201,7 @@ public class ApiConstants {
public static final String EP_FORK = "/fork";
public static final String EP_NODE_MANAGER = "/nodeman";
public static final String EP_UPGRADE = "/upgrade";
public static final String EP_LOG_FLAG = "/logFlag";
jonathan commented 4 years ago

I’d prefer the endpoint to simple by called /logs (and the constant named EP_LOGS) -- because in the long run, we may offer more fine-grained configuration than just on/off. We may also offer GET endpoints to read log data.

I'd prefer the endpoint to simple by called `/logs` (and the constant named `EP_LOGS`) -- because in the long run, we may offer more fine-grained configuration than just on/off. We may also offer GET endpoints to read log data.
@@ -220,0 +232,4 @@
selfNodeService.setLogFlag(flag);
return ok();
}

jonathan commented 4 years ago

I’d prefer to add a LogsResource class, and reference it here via @Path(EP_LOGS) to delegate everything under /logs to LogsResource.

I'd prefer to add a LogsResource class, and reference it here via `@Path(EP_LOGS)` to delegate everything under `/logs` to LogsResource.
kris commented 4 years ago

Added, but also moved to a most proper place - NodesResource - as these calls doesn’t actually require network UUID. Then don’t require node UUID either, so the final URL doesn’t contain any UUID. But that seems like more proper place as this log flag is node’s property.

Added, but also moved to a most proper place - NodesResource - as these calls doesn't actually require network UUID. Then don't require node UUID either, so the final URL doesn't contain any UUID. But that seems like more proper place as this log flag is node's property.
@@ -0,0 +66,4 @@
setLoggingForSupervisorConfig cfgFile REDIS_LOG_FLAG
done
fi

jonathan commented 4 years ago

Do we need to supervisorctl reload to make sure the new log locations are used by the various processes that supervisord starts? Where is that happening?

Do we need to `supervisorctl reload` to make sure the new log locations are used by the various processes that `supervisord` starts? Where is that happening?
kris commented 4 years ago

👍 Forgot to add that, sorry. And that is the answer to the question above `how do the supervisord changes take effect?

:+1: Forgot to add that, sorry. And that is the answer to the question above `how do the supervisord changes take effect?
kris changed title from WIP: (testing) Log flag and logs refactoring to Log flag and logs refactoring 4 years ago
kris changed title from Log flag and logs refactoring to WIP: (re-implementing) Log flag and logs refactoring 4 years ago
kris changed title from WIP: (re-implementing) Log flag and logs refactoring to Log flag and logs refactoring 4 years ago
jonathan closed this pull request 4 years ago
jonathan deleted branch kris/log_flag 4 years ago

Reviewers

jonathan requested changes 4 years ago
The pull request has been merged as d5d2bb508a.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.