-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR : No module found to provide logback-impl for logback-access{enabled} #5996
Comments
@joakime any idea? Seems like logback-impl.mod was removed. |
I'm surprised that we have a module for
I'm not sure the old |
+ Moved to /jetty-home/ to align with other logging type modules + Correct dependencies Signed-off-by: Joakim Erdfelt <[email protected]>
Opened PR #6002 You can enable it with |
Signed-off-by: Joakim Erdfelt <[email protected]>
Also of note,
|
I'm keen to just remove |
Signed-off-by: Joakim Erdfelt <[email protected]>
PR #6002 now just removes |
So what's the recommended way to configure request logging in Jetty 10? Request logging is a critical feature for any production web server. If logback-access is no longer the way, maybe the documentation needs to be updated? It's very confusing to figure out what's the preferred way of access logging in Jetty 10. |
The If you want to customize the output, then you'll need set the format on the If you want the request log to output to slf4j (so you can customize the rolling / etc), then you'll want to use the Create a <?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Set name="RequestLog">
<New id="RequestLog" class="org.eclipse.jetty.server.CustomRequestLog">
<!-- Writer -->
<Arg>
<New class="org.eclipse.jetty.server.Slf4jRequestLogWriter">
<Arg>accesslog</Arg>
</New>
</Arg>
<!-- Format String -->
<Arg>
<Property name="jetty.requestlog.formatString">
<Default>
<Get class="org.eclipse.jetty.server.CustomRequestLog" name="EXTENDED_NCSA_FORMAT"/>
</Default>
</Property>
</Arg>
</New>
</Set>
</Configure> This will output request log events to the logger named "accesslog". From there you can use a tool like logback and it's |
Thanks Joakime, but that one isn't working. The constructor of Slf4jRequestLogWriter doesn't take any arguments. I ran it without an argument and it runs but doesn't write logs anywhere. I changed it to:
and now a log file show up in /tmp/accesslog as expected. This is major progress! Still would be nice to have features like log rotation. I'm looking into how to do that. I also figured out how to get the application logging working. This is still using the logging-logback module, just as before. I'm going to wipe out my configuration and re-install it from scratch to make sure I have it documented properly. Maybe there should be a documentation bug on this whole situation, to give an easier setup for ordinary logging needs. |
@chiralsoftware you should not need to override the default jetty-requestlog.xml file unless you want some alternate configuration like using the By enabling the
Then you can further configure the settings in in your
This is described in the Jetty-9 documentation in the configuring-jetty-request-logs section. I don't think this section exists in the Jetty-10 documentation yet, which is still a work in progress and is being re-written. |
Thanks Lachlan. I had that going before, but for a production system you almost always would want the logs to be in /var or some other directory. I guess I could symlink it. But it would be nice if it were a little more "works out of the box". |
@chiralsoftware if you want to use an absolute path for the logs like Maybe we could do something similar to what was done for the keystore path in issue #5689. This could introduce a new property to set the absolute path of the requestlog directory without having to override the xml file. |
Thanks Lachlan. I fully support making it easy to have absolute paths. Log files usually live in |
@lachlan-roberts @chiralsoftware Does the module suggest we can set the directory of the log with properties???
So can't the I'm also -1 on removing support for logback-access |
logback-access is broken, the jar itself. |
@lachlan-roberts thank you for the suggestion. I just copied
and it works as expected. That's nice! Maybe the documentation should mention that, or there should be an easy way to achieve it using the I will also see about the same thing for the keystore, as I also don't really want the keystore in |
We have introduced an absolute path for the KeyStore so it can now be saved anywhere in the file system. |
@lachlan-roberts can you introduce an absolute path for the log file path like we have done in |
@joakime oh! Well we broke it then, so I think we need to help them out with a PR to fix it. |
logback looks almost dead project... |
@olamy If it's dead or almost dead it shouldn't be supported. My perspective, as a user, is that Jetty already has a confusingly large number of different logging options and modules. It would be better for users like me to have fewer, and also to have clear documentation giving a good default setup that will work reasonably for most users. |
@chiralsoftware I mean I do not hope to see logback code being fixed with the changes done in 10. |
@olamy What I would really like is for Jetty to tell me which log configuration to use. I don't have any preferences and it's confusing that there are so many choices. It should just be, "Use this specific module for request logs, this specific module for application logs. If you really need to customize it in some way, then you have these options." |
@chiralsoftware Thanks for your input... very timely as we are reworking the documentation and logging is literally the next section to be done. We do have many different logging options, unfortunately because we are integrated in many different projects with many different logging preferences, so we don't get to assert our own preferences. If just enable the The server logging if left unconfigured will go to stderr. If you want that in a file then use the @olamy logback just logs requests... I wouldn't expect a lot of activity in such a project. |
* Issue #5996 - Removing logback-access.mod Signed-off-by: Joakim Erdfelt <[email protected]>
Replacement is requestlog jetty/jetty.project#5996
This disables the use of logback-access because logback-access is not compatible with Jetty 10. See jetty/jetty.project#5996 This changes the implementation to use a CustomRequestLog in jetty with the SLF4JLogWriter until a better solution can be determined. This means that logging won't obey the logback-access configuration specified.
A fresh installation of Jetty 10.0.1:
Any ideas on this? If logback-access is no longer supported it shouldn't be there, but if it is there, it seems like it needs a logback-impl module. It's possible I'm skipping a step somewhere but it seems like something is missing.
The text was updated successfully, but these errors were encountered: