All, I can verify that currently, the DSpace REST API logs any non-successful request as minimally a WARN in the logs. This is to allow you to more easily see/debug authentication failures and similar.
* By default, any 4xx response code is logged as a WARN unless it's listed in the "logging.server.include-stacktrace-for-httpcode" configuration. Then it's logged as an ERROR instead of a WARN * By default, all 5xx response codes are always logged as ERROR. These tend to be a failure of the backend though. Currently, this isn't directly configurable, but you could either switch to logging ERROR only, or you could modify the DSpaceApiExceptionControllerAdvice class where all response codes are logged. See this method in that class: https://github.com/DSpace/DSpace/blob/main/dspace-server-webapp/src/main/java/org/dspace/app/rest/exception/DSpaceApiExceptionControllerAdvice.java#L253-L295 That said, if you feel this should be configurable in some manner, please submit a ticket with your suggestions & we'll see if we can find a way to improve this for future 7.x releases. https://github.com/DSpace/DSpace/issues (The challenge here is that obviously detailed logs of 4xx and 5xx responses can be important to debug problems, but I can understand how some of these responses may be logged too frequently in production scenarios.) Thanks, Tim ________________________________ From: [email protected] <[email protected]> on behalf of Mike Schouten <[email protected]> Sent: Tuesday, October 4, 2022 2:14 PM To: DSpace Technical Support <[email protected]> Subject: Re: [dspace-tech] dspace.log is getting very big with continuous WARN and some ERROR messages Salutations! I had noticed this issue as well and was going to ask about it. I'm also getting these warning messages in dspace.log, resulting in very large log files. In my case, our health check system is continuously pinging /home to make sure the site is still alive, and every time I get two warnings: 2022-10-03 17:30:37,918 WARN fbebb20e-2cdd-49d4-8a6c-b2b421f2fca1 e5f2ba57-c08b-4858-aaa1-40824f726579 org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Authentication is required (status:401 exception: Access is denied at: org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:73)) 2022-10-03 17:30:37,918 WARN fbebb20e-2cdd-49d4-8a6c-b2b421f2fca1 030126ca-c7df-443d-aa0e-934622c0db67 org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Authentication is required (status:401 exception: Access is denied at: org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:73)) So, unlike the linked-to issue, even without trying to do anything like downloading files or editing items DSpace 7.3 is spitting out consistent warning messages about being unauthorized. The website works fine though... I can navigate, view items, download and edit no problems. My solution was going to be switching the logging level to ERROR when we go live... not ideal maybe, but serviceable. On Monday, October 3, 2022 at 1:52:51 AM UTC-6 [email protected] wrote: Hey Fatih, I was curious so I checked GitHub for issues with this error and bingo! https://github.com/DSpace/DSpace/issues/8378 So it looks like you're not alone... Cheers, On Fri, Sep 30, 2022 at 10:15 PM Fatih Güneş <[email protected]> wrote: Hello everyone, My dspace log is getting bigger and bigger with continuous (nearly 5 messages in every second) below messages. It is mostly WARN but ERROR line is seen sometimes as well. Do you have any idea, why I get these messages and how can I deep further? I am on Dspace 7.3. ERROR d4b3c8d5-5f04-48e6-bd5a-e0c55fc97740 c10d26f3-2b24-4b38-a374-6c61048ee6cb org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Unprocessable or invalid entity (status:422) WARN d4b3c8d5-5f04-48e6-bd5a-e0c55fc97740 9fde6cee-4004-44e3-a812-6dc46853f8e6 org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Authentication is required (status:401 exception: Access is denied at: org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:73)) -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/fab6fc47-b21e-4ae4-ba4a-c005fa753aedn%40googlegroups.com<https://groups.google.com/d/msgid/dspace-tech/fab6fc47-b21e-4ae4-ba4a-c005fa753aedn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- Alan Orth [email protected] https://picturingjordan.com https://englishbulgaria.net https://mjanja.ch -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/8c7c5df7-39f9-4916-aad8-2a038cd36139n%40googlegroups.com<https://groups.google.com/d/msgid/dspace-tech/8c7c5df7-39f9-4916-aad8-2a038cd36139n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/PH0PR22MB3274EDE985295C693F47B08DED5A9%40PH0PR22MB3274.namprd22.prod.outlook.com.
