Visit my.sonatype.com for documentation on Nexus Repository version 2.
For Nexus Repository 2.11.4 the request log defaults are even more useful. Improvements have been added, such as:
- in certain cases, the authenticated user making the request was not logged in nexus.log - this has been fixed
- elapsed time is now recorded as the last field of the log pattern format - this can help identify particularly slow requests
- the request.log is archived with a more compatible name: request-YYYY-MM-DD.log.gz, instead of request.log.YYYY-MM-DD.gz
For Nexus Repository 2.8.1, we fixed a bug [NEXUS-6545] that corrects where the rotated access logs end up.
For Nexus Repository 2.8+, access logging is enabled by default [NEXUS-6472] and has a number of improvements.
- logging uses a performant and flexible LogBack implementation with built-in log rotation already configured for 90 days of log file retention
- can be easily customized to print any variety of request values
- can be disabled entirely by commenting out a single line
wrapper.app.parameter.2=conf/jetty-requestlog.xml
line inbin/jsw/conf/wrapper.conf
- if required, customize the log rotation settings by editing
NEXUS_HOME/conf/logback-access.xml
and restart Nexus
For Nexus Repository 2.7, replace the contents of jetty.xml with the contents of the Nexus bundled examples/jetty-access-log.xml
after verifying any differences with your own customizations.
For Nexus Repository 2.2 to 2.6, replace the contents of "<nexus_root>/conf/jetty.xml" with this jetty-access-log.xml file, then restart the server. The access log will show up in sonatype-work/nexus/logs.
For Nexus Repository 2.1 use jetty-access-log-2.1.xml
For Nexus Repository 2 2.0 use jetty-access-log-2.0.xml
For options to monitor the user making requests into Nexus Repository 2, see this article.
2 Comments
I run 2.7.1 and set this up, but the jetty access log is not including the HTTP user name if provided. I'm not sure how to fix this yet. The username field is useful to help us audit our migration away from anonymous access.
We are closing this article for comments.
If you have a support license, please contact us by submitting a support ticket.
If you do not have a support license, please use our Nexus Users List or our other free support resources.