2

Is there a way to create deployment hooks on Wildfly?

I need to be mailed after all deployments made in my server. Doesn't matter if the deployment is OK or not.

Simona R.
  • 558
  • 6
  • 20
Hernã Saldanha
  • 300
  • 2
  • 10

1 Answers1

1

I have a solution: you need a custom log handler.

  1. Create a class that extends java.util.logging.Handler;
  2. Implement the publish(LogRecord) method. This method is called for each log entry;
  3. Generate a .jar file;
  4. Put it inside the folder "modules//main/";
  5. In Wildfly 8.2 admin area, access Configuration/Core/Logging/Handler/Custom page. Wildfly must be rebooted;
  6. Add a new Handler with your class information;
  7. Go back to "Root Logger/Handler" page and add the new Handler.

That's all.

Hernã Saldanha
  • 300
  • 2
  • 10