-Xbootclasspath/p:jboss-logmanager-<VERSION>.jar equivalent during runtime

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

-Xbootclasspath/p:jboss-logmanager-<VERSION>.jar equivalent during runtime

Sam Thomas
Hi,

I understand when starting jboss you can supply the above to specify the logmanager. If this is not supplied during start up and an agent connects to jboss during runtime using agentmain(), how can I replicate the -Xbootclasspath/p: behavior during runtime? 

Thanks and Regards
Sam Thomas

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: -Xbootclasspath/p:jboss-logmanager-<VERSION>.jar equivalent during runtime

James Perkins
I'm not sure I follow. The only time the log manager is required to be on the boot class path is if the agent creates a logger before the java.util.logging.LogManager is configured.

On Tue, Nov 13, 2018 at 6:17 PM Sam Thomas <[hidden email]> wrote:
Hi,

I understand when starting jboss you can supply the above to specify the logmanager. If this is not supplied during start up and an agent connects to jboss during runtime using agentmain(), how can I replicate the -Xbootclasspath/p: behavior during runtime? 

Thanks and Regards
Sam Thomas
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


--
James R. Perkins
JBoss by Red Hat

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: -Xbootclasspath/p:jboss-logmanager-<VERSION>.jar equivalent during runtime

Sam Thomas
Hi James,

Oh I see, that makes total sense - since premain() executes before LogManager is configured. But when agentmain() is executes it’s afterwards. I wouldn’t need to replicate this behavior. I would probably have add a new one if I don’t get one that I need. Am I correct? 

Thanks
./Sam

On Wed, Nov 14, 2018 at 11:38 PM James Perkins <[hidden email]> wrote:
I'm not sure I follow. The only time the log manager is required to be on the boot class path is if the agent creates a logger before the java.util.logging.LogManager is configured.

On Tue, Nov 13, 2018 at 6:17 PM Sam Thomas <[hidden email]> wrote:
Hi,

I understand when starting jboss you can supply the above to specify the logmanager. If this is not supplied during start up and an agent connects to jboss during runtime using agentmain(), how can I replicate the -Xbootclasspath/p: behavior during runtime? 

Thanks and Regards
Sam Thomas
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


--
James R. Perkins
JBoss by Red Hat
--

Thanks
./Sam

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: -Xbootclasspath/p:jboss-logmanager-<VERSION>.jar equivalent during runtime

James Perkins
Hi Sam,
It just depends if the any method on the java.util.logging.LogManager gets invoked before JBoss Modules sets the java.util.logging.manager=org.jboss.logmanager.LogManager system property. This happens fairly early in the main entry point of jboss-modules.


On Wed, Nov 14, 2018 at 6:45 PM Sam Thomas <[hidden email]> wrote:
Hi James,

Oh I see, that makes total sense - since premain() executes before LogManager is configured. But when agentmain() is executes it’s afterwards. I wouldn’t need to replicate this behavior. I would probably have add a new one if I don’t get one that I need. Am I correct? 

Thanks
./Sam

On Wed, Nov 14, 2018 at 11:38 PM James Perkins <[hidden email]> wrote:
I'm not sure I follow. The only time the log manager is required to be on the boot class path is if the agent creates a logger before the java.util.logging.LogManager is configured.

On Tue, Nov 13, 2018 at 6:17 PM Sam Thomas <[hidden email]> wrote:
Hi,

I understand when starting jboss you can supply the above to specify the logmanager. If this is not supplied during start up and an agent connects to jboss during runtime using agentmain(), how can I replicate the -Xbootclasspath/p: behavior during runtime? 

Thanks and Regards
Sam Thomas
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


--
James R. Perkins
JBoss by Red Hat
--

Thanks
./Sam


--
James R. Perkins
JBoss by Red Hat

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: -Xbootclasspath/p:jboss-logmanager-<VERSION>.jar equivalent during runtime

Sam Thomas
Hi James,

Hmm I see. One Final question. When an agent starts up with the JVM I have seen this as well 

-Xbootclasspath/p:jboss-logmanager-<VERSION>.jar;log4j-jboss-logmanager-<VERSION>.jar.

So when we don't provide these arguments at startup and the agent attaches later, the log4j manager will not be present. So I would have to alter the LogManager object or something like that. Changing the system property that points to these guys is not going to make it work right? Or am I understanding this wrong and only one of them is used (whichever is found first).

Thanks
./Sam


On Thu, Nov 15, 2018 at 8:46 AM James Perkins <[hidden email]> wrote:
Hi Sam,
It just depends if the any method on the java.util.logging.LogManager gets invoked before JBoss Modules sets the java.util.logging.manager=org.jboss.logmanager.LogManager system property. This happens fairly early in the main entry point of jboss-modules.


On Wed, Nov 14, 2018 at 6:45 PM Sam Thomas <[hidden email]> wrote:
Hi James,

Oh I see, that makes total sense - since premain() executes before LogManager is configured. But when agentmain() is executes it’s afterwards. I wouldn’t need to replicate this behavior. I would probably have add a new one if I don’t get one that I need. Am I correct? 

Thanks
./Sam

On Wed, Nov 14, 2018 at 11:38 PM James Perkins <[hidden email]> wrote:
I'm not sure I follow. The only time the log manager is required to be on the boot class path is if the agent creates a logger before the java.util.logging.LogManager is configured.

On Tue, Nov 13, 2018 at 6:17 PM Sam Thomas <[hidden email]> wrote:
Hi,

I understand when starting jboss you can supply the above to specify the logmanager. If this is not supplied during start up and an agent connects to jboss during runtime using agentmain(), how can I replicate the -Xbootclasspath/p: behavior during runtime? 

Thanks and Regards
Sam Thomas
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


--
James R. Perkins
JBoss by Red Hat
--

Thanks
./Sam


--
James R. Perkins
JBoss by Red Hat

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: -Xbootclasspath/p:jboss-logmanager-<VERSION>.jar equivalent during runtime

James Perkins
Hi Sam,
To be honest I'm not too familiar with the lifecycle of an agent. If your agent uses log4j, then you'd likely need to add the log4j-jboss-logmanager library as well. If your agent does not use log4j then it should be safe _not_ to add it.

On Wed, Nov 14, 2018 at 8:06 PM Sam Thomas <[hidden email]> wrote:
Hi James,

Hmm I see. One Final question. When an agent starts up with the JVM I have seen this as well 

-Xbootclasspath/p:jboss-logmanager-<VERSION>.jar;log4j-jboss-logmanager-<VERSION>.jar.

So when we don't provide these arguments at startup and the agent attaches later, the log4j manager will not be present. So I would have to alter the LogManager object or something like that. Changing the system property that points to these guys is not going to make it work right? Or am I understanding this wrong and only one of them is used (whichever is found first).

Thanks
./Sam


On Thu, Nov 15, 2018 at 8:46 AM James Perkins <[hidden email]> wrote:
Hi Sam,
It just depends if the any method on the java.util.logging.LogManager gets invoked before JBoss Modules sets the java.util.logging.manager=org.jboss.logmanager.LogManager system property. This happens fairly early in the main entry point of jboss-modules.


On Wed, Nov 14, 2018 at 6:45 PM Sam Thomas <[hidden email]> wrote:
Hi James,

Oh I see, that makes total sense - since premain() executes before LogManager is configured. But when agentmain() is executes it’s afterwards. I wouldn’t need to replicate this behavior. I would probably have add a new one if I don’t get one that I need. Am I correct? 

Thanks
./Sam

On Wed, Nov 14, 2018 at 11:38 PM James Perkins <[hidden email]> wrote:
I'm not sure I follow. The only time the log manager is required to be on the boot class path is if the agent creates a logger before the java.util.logging.LogManager is configured.

On Tue, Nov 13, 2018 at 6:17 PM Sam Thomas <[hidden email]> wrote:
Hi,

I understand when starting jboss you can supply the above to specify the logmanager. If this is not supplied during start up and an agent connects to jboss during runtime using agentmain(), how can I replicate the -Xbootclasspath/p: behavior during runtime? 

Thanks and Regards
Sam Thomas
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


--
James R. Perkins
JBoss by Red Hat
--

Thanks
./Sam


--
James R. Perkins
JBoss by Red Hat


--
James R. Perkins
JBoss by Red Hat

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev