TomEE stderr and stdout

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

TomEE stderr and stdout

fabian-a.richter

Hi,

 

I am searching for a way to re-enable stdout and stderr logging in TomEE 7.0.4.

 

The files tomee-stderr and tomee-stdout were created automatically in 1.7 but now they are gone.

 

I need these files because log output that was in tomee-stdout after enabling kerberos loggin with –Dsun.security.krb5.debug=true is now nowhere to be found L

 

How do I “switch on” this old feature?

 

Thanks and best

Fabian


smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: TomEE stderr and stdout

Romain Manni-Bucau
Hi,

did you try:

export CATALINA_OUT=/tmp/tomee-stdout

?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 22 juin 2018 à 15:18, <[hidden email]> a écrit :

> Hi,
>
>
>
> I am searching for a way to re-enable stdout and stderr logging in TomEE
> 7.0.4.
>
>
>
> The files tomee-stderr and tomee-stdout were created automatically in 1.7
> but now they are gone.
>
>
>
> I need these files because log output that was in tomee-stdout after
> enabling kerberos loggin with –Dsun.security.krb5.debug=true is now nowhere
> to be found L
>
>
>
> How do I “switch on” this old feature?
>
>
>
> Thanks and best
>
> Fabian
>
Reply | Threaded
Open this post in threaded view
|

Re: TomEE stderr and stdout

maciejka
Hello

In my webapp I have statement:

System.out.println("Some message");

When I invoke Rest endpoint this is not printed neither in default
catalina.out log nor in file pointed by CATALINA_OUT.

Are 'System.out.println' statements diabled or redirected to /dev/null ? How
to enable them?

TomEE 7.0.4. | java 1.8.0_152 | Linux debian 3.16.0-4-amd64





--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Reply | Threaded
Open this post in threaded view
|

Re: TomEE stderr and stdout

Romain Manni-Bucau
Hi,

no it is still used but if you rely on "run" command this is totally
ignored since you own the shell in this case.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 19 juil. 2018 à 15:36, maciejka <[hidden email]>
a écrit :

> Hello
>
> In my webapp I have statement:
>
> System.out.println("Some message");
>
> When I invoke Rest endpoint this is not printed neither in default
> catalina.out log nor in file pointed by CATALINA_OUT.
>
> Are 'System.out.println' statements diabled or redirected to /dev/null ?
> How
> to enable them?
>
> TomEE 7.0.4. | java 1.8.0_152 | Linux debian 3.16.0-4-amd64
>
>
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>
Reply | Threaded
Open this post in threaded view
|

Re: TomEE stderr and stdout

maciejka
I start TomEE, deploy my app, and invoke rest endpoint:
Example:

@GET
@Path("/all")
@Produces(MediaType.APPLICATION_JSON + "; charset=UTF-8")
@StringifyJSON
public Service getAll(@DefaultValue("false")
@QueryParam(CompressJsonFilter.PRETTY) boolean pretty) {
       logger.debug("GET ServicesAll with param pretty {}", pretty);
       System.out.println("Some text")
       ....
       return l;
}
Method completes sucessfully.
Should 'Some text' be printed in catalina.out? It is not. Why?
What do You mean by "run" command? I do not run System.out from shell.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Reply | Threaded
Open this post in threaded view
|

Re: TomEE stderr and stdout

Romain Manni-Bucau
Le jeu. 19 juil. 2018 à 17:05, maciejka <[hidden email]>
a écrit :

> I start TomEE, deploy my app, and invoke rest endpoint:
> Example:
>
> @GET
> @Path("/all")
> @Produces(MediaType.APPLICATION_JSON + "; charset=UTF-8")
> @StringifyJSON
> public Service getAll(@DefaultValue("false")
> @QueryParam(CompressJsonFilter.PRETTY) boolean pretty) {
>        logger.debug("GET ServicesAll with param pretty {}", pretty);
>        System.out.println("Some text")
>        ....
>        return l;
> }
> Method completes sucessfully.
> Should 'Some text' be printed in catalina.out? It is not. Why?
> What do You mean by "run" command? I do not run System.out from shell.
>

If you start tomcat with catalina.[bat|sh] run then it is normal, if not it
is not. Maybe share the command launched, the system properties and
environment variables (you can grab most of it from a JMX console).


>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>