Skip to content
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

Grails 5.3.6 multi-project log not injected into plugin services #13508

Closed
mgm7734 opened this issue May 10, 2024 · 3 comments
Closed

Grails 5.3.6 multi-project log not injected into plugin services #13508

mgm7734 opened this issue May 10, 2024 · 3 comments

Comments

@mgm7734
Copy link

mgm7734 commented May 10, 2024

Plugin project log statements all cause errors.
This seemed to work with 5.3.2.

I created a simple multi-project using the instructions from https://guides.grails.org/grails-multi-project-build/guide/index.html

package pir.domain
class GreetService {
    def greet() {
        log.warn("DEBUG>>> GreetService.greet()")    // <=== this fails at runtime
        return "Hello, World!"
    }
}

Steps to Reproduce

  1. Clone https://github.com/mgm7734/multi-proj
  2. Run with ./gradlew bootRun
  3. Navigate to http://localhost:8080/hello/index

Expected Behaviour

Console should output warning "DEUBUG>>> GreetService.greet()"
The page should display.

Actual Behaviour

You see this error

    /hello/index
Class
    groovy.lang.MissingPropertyException
Message
    null
Caused by
    No such property: log for class: pir.domain.GreetService
``
### Environment Information

- **Operating System**: osx
- **Grails Version:** 5.3.2
- **JDK Version:** openjdk version "11.0.17" 2022-10-18 LTS
- **Container Version (If Applicable):** any

### Example Application

- https://github.com/mgm7734/multi-proj

@matrei
Copy link
Contributor

matrei commented May 10, 2024

I think, if you are using log in you plugin, you should add implementation 'org.grails:grails-logging' to the plugin dependencies.

@mgm7734
Copy link
Author

mgm7734 commented May 13, 2024

That should be in the docs, like https://guides.grails.org/grails-multi-project-build/guide/index.html

@mgm7734
Copy link
Author

mgm7734 commented May 13, 2024

bye

@mgm7734 mgm7734 closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants