| type=page |
| status=published |
| title=logging |
| next=monitoring.html |
| prev=instance.html |
| ~~~~~~ |
| logging |
| ======= |
| |
| [[logging-5asc]][[GSRFM00270]][[logging]] |
| |
| logging |
| ------- |
| |
| capturing information on \{product---name} runtime events |
| |
| [[sthref2404]] |
| |
| Description |
| |
| Logging is the process by which \{product---name} captures data about |
| events that occur during \{product---name} operation. \{product---name} |
| components and application components generate logging data, which is |
| saved in the server log, typically domain-dir`/logs/server.log`. The |
| server log is the first source of information if \{product---name} |
| problems occur. |
| |
| The server log is rotated when the file reaches the specified size in |
| bytes, or the specified time has elapsed. The file can also be rotated |
| manually by using the `rotate-log` subcommand. |
| |
| In addition to the server log, the domain-dir`/logs` directory contains |
| two other kinds of logs: |
| |
| * HTTP service access logs, located in the `/access` subdirectory |
| * Transaction service logs, located in the `/tx` subdirectory |
| |
| Logging levels can be configured by using the Administration Console or |
| the `set-log-levels` subcommand. Additional properties can be set by |
| using the Administration Console or by editing the `logging.properties` |
| file. The default `logging.properties` file is typically located in |
| domain-dir`/config`. |
| |
| Although application components can use the Apache Commons Logging |
| Library to record messages, the platform standard JSR 047 API is |
| recommended for better log configuration. |
| |
| [[sthref2405]] |
| |
| See Also |
| |
| link:list-log-levels.html#list-log-levels-1[`list-log-levels`(1)], |
| link:rotate-log.html#rotate-log-1[`rotate-log`(1)], |
| link:set-log-levels.html#set-log-levels-1[`set-log-levels`(1)] |
| |
| link:asadmin.html#asadmin-1m[`asadmin`(1M)] |
| |
| "link:../administration-guide/logging.html#GSADG00010[Administering the Logging Service]" in GlassFish |
| Server Open Source Edition Administration Guide |
| |
| |