Skip to main content

How can I write the Errors of my App in the GlassFish-Error-Log?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
cjs1976
Offline
Joined: 2013-01-10

Hi!

This is my first app with Java EE and GlassFish. I tried to use log4j for logging the errors (also for debugging), but my erros are not in the server.log of GlassFish.

I found some very complicated articles about changing the GlassFish-Logging, and they were also realy old.

Please can anyone tell me, what I have to do, so that my app can use the GlassFish-Error-Log-File. Or if there is a better way to handle error-logs, please let me know.

Thanks,
Christian.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mihael Schmidt Guest
Offline
Joined: 2011-08-29

AFAIK sysout (System.out.println()) will create a log message of level
INFO and syserr will create a log message of ERROR (or was it WARNING,
dunno). If that is enough you don't need any additional logging framework.

On 30.01.2013 11:39, forums@java.net wrote:
> Hi! This is my first app with Java EE and GlassFish. I tried to use
> log4j for
> logging the errors (also for debugging), but my erros are not in the
> server.log of GlassFish. I found some very complicated articles about
> changing the GlassFish-Logging, and they were also realy old. Please can
> anyone tell me, what I have to do, so that my app can use the
> GlassFish-Error-Log-File. Or if there is a better way to handle error-logs,
> please let me know. Thanks, Christian.
>
> --
>
> [Message sent by forum member 'cjs1976']
>
> View Post: http://forums.java.net/node/894318
>
>

--

Schulz Gebäudeservice GmbH & Co. KG
Dr.-Max-Ilgner-Straße 17
32339 Espelkamp
Persönlich haftende Gesellschafterin:
Gebäudereinigung Joachim Schulz
Verwaltungsgesellschaft mbH
Telefon: +49 5772 9100 0
Telefax: +49 5772 9100 11
Email: zentrale@sgbs.de
Internet: www.sgbs.de
Geschäftsführer: Joachim und Dirk Schulz, Norbert Kosica
Handelsregister Bad Oeynhausen: HRA 5902, HRB 8591
UST-Id-Nr.: DE 125752702