Search code examples
groovygitblit

Gitblit hooks logs


I'm currently trying to create a hook for Gitblit in Groovy, the problem I'm facing is that I don't know how to debug it. I think it's failing due to some missing library, but I have no idea where I can see why it is failing.

Is there some way to configure a log for hooks so I'm able to see the exceptions that are being thrown?


Solution

  • Exceptions in the groovy hooks are automatically logged to the container's logging system.

    The groovy hooks run in the same classloader as Gitblit so unless you are adding new libraries in your script via Grapes then your hook has full access to all of Gitblit and is unlikely failing due to a missing library.