-
Notifications
You must be signed in to change notification settings - Fork 464
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
[WFCORE-6579] Allow process controller log file capture initial manag… #5789
Conversation
CC @bstansberry / @jamezp I ended up with the above, let me know your thoughts, thanks! |
Core -> WildFly Preview Integration Build 13125 outcome was UNKNOWN using a merge of e7e7033 |
Core -> Full Integration Build 13056 outcome was UNKNOWN using a merge of e7e7033 |
Core -> Full Integration Build 13285 outcome was UNKNOWN using a merge of e7e7033 |
// Signalling the Process Controller to switch also the System.err is optional since after installing StdioContext, | ||
// there won't be more logs sent to the standard Err. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thinking a bit more, although optional, the aggregation of the StdError and Stout and where they are redirected will be handled by the logging.configuration
file, so assuming that both will be redirected to the Stout is weak, since I guess that can be changed via the logging configuration file and instead of using handler.CONSOLE.target=SYSTEM_OUT
use handler.CONSOLE.target=SYSTEM_ERR
, so probably this should be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
// This message is not used to display any information on the standard output, it signals the Process Controller | ||
// to switch the standard output of this managed process from the process controller log to the process controller | ||
// standard output. | ||
// Once the StdioContext gets installed, both the stout and stderr of this managed process will be captured, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stdout
instead of stout
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
logSystemErr = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".system.err"); | ||
logSystemOut = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".system.out"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not critical, should we use stdout
and stderr
instead? I don't have a strong opinion, I'm just curious :)
We also might want to consider the order to have the process name last to make filtering easier. For example you could just skip stdout
with logger.org.jboss.as.process.system.out.level=WARN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not critical, should we use stdout and stderr instead?
I am fine with both. xxx.system.out
and xxx.system.err
are very intuitive to me due to the similitude with the Java methods, if xxx.system.stdout
and xxx.system.stderr
are more related to logging world, I am fine with them too. I do not have any preference.
We also might want to consider the order to have the process name last to make filtering easier. For example you could just skip stdout with logger.org.jboss.as.process.system.out.level=WARN
Thanks, that's a smarter choice. I agree with you.
We already have the .status
category defined as "org.jboss.as.process." + processName + ".status"
. Should we change it too?
That would make all the related categories consistent, although would affect existing configurations. However, since are logging categories, any existing configuration can be changed to adapt to the new version and that would not affect server behaviour, so I am in favor of adapting those three.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the categories to xxx.system.stdout
and xxx.system.stderr
.
However, I left the "org.jboss.as.process." + processName + ".system.sterr"
and "org.jboss.as.process." + processName + ".system.stout"
as proposed originally since we already have "org.jboss.as.process." + processName + ".status"
and users could be familiar with that category.
I prefer being conservative here since this is an enhancement and I don't want to introduce a change on the .status
category or have categories working differently than the status one. I think the usage of them is unlikely, but if they are needed I think is preferable a consistent with what we previously have.
Core -> WildFly Preview Integration Build 13140 outcome was FAILURE using a merge of 5018b3a |
Core -> Full Integration Build 13071 outcome was FAILURE using a merge of 5018b3a |
Core -> Full Integration Build 13300 outcome was FAILURE using a merge of 5018b3a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll happily defer to you and @jamezp re the 'system.stdxxx' thing, but my input is just 'stdxxx' is best. Admins consume logs, and they may not even know about the Java System class. OTOH I expect a Java developer interested in domain logging would understand what stdout and stderr mean. Those are generic terms:
@@ -107,7 +125,9 @@ enum State { | |||
this.pcAuthKey = pcAuthKey; | |||
isPrivileged = privileged; | |||
respawnPolicy = respawn ? RespawnPolicy.RESPAWN : RespawnPolicy.NONE; | |||
log = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".status"); | |||
logStatus = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".status"); | |||
logSystemErr = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".system.sterr"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/sterr/stderr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
log = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".status"); | ||
logStatus = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".status"); | ||
logSystemErr = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".system.sterr"); | ||
logSystemOut = Logger.getMessageLogger(ProcessLogger.class, "org.jboss.as.process." + processName + ".system.stout"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/stout/stdout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to
"org.jboss.as.process." + processName + ""
We don't want to mess with the existing 'status' and these should be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
@@ -121,6 +121,9 @@ public class CommandLineConstants { | |||
public static final String PREFER_IPV4_STACK = "java.net.preferIPv4Stack"; | |||
public static final String PREFER_IPV6_ADDRESSES = "java.net.preferIPv6Addresses"; | |||
|
|||
public static final String MANAGED_PROCESS_SYSTEM_ERROR_TO_LOG = "jboss.domain.managed-process.system.sterr.to.process-controller.log"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sterr should be stderr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
@@ -121,6 +121,9 @@ public class CommandLineConstants { | |||
public static final String PREFER_IPV4_STACK = "java.net.preferIPv4Stack"; | |||
public static final String PREFER_IPV6_ADDRESSES = "java.net.preferIPv6Addresses"; | |||
|
|||
public static final String MANAGED_PROCESS_SYSTEM_ERROR_TO_LOG = "jboss.domain.managed-process.system.sterr.to.process-controller.log"; | |||
public static final String MANAGED_PROCESS_SYSTEM_OUT_TO_LOG = "jboss.domain.managed-process.system.stout.to.process-controller.log"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stout should be stdout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
…ed process Standard Out and Err Jira issue: https://issues.redhat.com/browse/WFCORE-6579
Thanks @jamezp and @bstansberry ! |
…ed process Standard Out and Err
Jira issue: https://issues.redhat.com/browse/WFCORE-6579