Add support for injecting WildFly log file paths using @ServerResource with a new @Log annotation.
Proposed API
@WildFlyTest
public class LogFileTest {
@ServerResource
@Log("server.log")
private Path serverLog;
@ServerResource
@Log // Defaults to "server.log"
private Path defaultLog;
@Test
public void checkServerLog() {
assertTrue(Files.exists(serverLog));
// Can read/parse log file for test validation
}
}
Use Cases
- Validating specific log messages appear during tests
- Checking for errors/warnings in logs
- Performance testing by analyzing log timestamps
- Debugging failing tests by examining log output
Implementation Notes
- Path should resolve to
${jboss.home}/standalone/log/${logFileName} for standalone mode
- For domain mode, might need
@DomainServer qualifier to specify which server's logs
- Consider supporting other log files like
gc.log, audit.log, etc.
Related
Similar to how @JBossHome injects the WildFly home directory as a Path.
Add support for injecting WildFly log file paths using
@ServerResourcewith a new@Logannotation.Proposed API
Use Cases
Implementation Notes
${jboss.home}/standalone/log/${logFileName}for standalone mode@DomainServerqualifier to specify which server's logsgc.log,audit.log, etc.Related
Similar to how
@JBossHomeinjects the WildFly home directory as a Path.