@groovy.transform.CompileStatic final class StartupLog extends java.lang.Object
What a starting application prints, read as it is written.
Asked whether the application has finished starting, rather than whether the word "Started"
has appeared. A container prints that word well before the application is ready -- Jetty logs
Started ServerConnector@... and Started Server@... while the context is still
being built -- and a run taken for started there is trained or traced half-built. What is
recorded is then quietly thinner than it should be, which is the kind of thing that shows up as a
slower start or a missing class in an image rather than as anything that failed.
Spring Boot's own line has a shape no container's does: a name, in, and a number of
seconds. That is what is matched.
Only what has been added since the last look is read, and it is read as UTF-8 rather than as whatever the machine's default happens to be. Matching is on whole lines, so a line still being written is left for the next look rather than being cut in half and missed.
| Constructor and description |
|---|
StartupLog(java.io.File file) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
saysItStarted()Whether the application has said it finished starting. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |