Class LogbackPrecompiler.Result
- Enclosing class:
LogbackPrecompiler
status(), one message() for the caller to log, the
generated entries(), and the warnings() the caller logs at warning level, which most
results do not have.- Since:
- 3.2.0
-
Method Summary
Modifier and TypeMethodDescriptionentries()The generated entries: the class files and theMETA-INF/services/ch.qos.logback.classic.spi.Configuratorfile, by entry name, in order.message()One line for the caller to log: what was compiled, or why nothing was.status()What happened.warnings()Lines for the caller to log at warning level, each on its own, aftermessage().
-
Method Details
-
status
-
message
One line for the caller to log: what was compiled, or why nothing was. It is informational forLogbackPrecompiler.Status.GENERATEDandLogbackPrecompiler.Status.STOOD_DOWNand worth a warning forLogbackPrecompiler.Status.FAILED. Whatever else deserves a warning is inwarnings(), never in this line.- Returns:
- the line
-
warnings
Lines for the caller to log at warning level, each on its own, aftermessage(). Each line is complete: it names the file it is about, what it means at run time and what to do instead.Only a
LogbackPrecompiler.Status.GENERATEDresult can have any, and most have none. It has one line for each packagedapplication*orbootstrap*file, of the application output or of an entry of the runtime class path, that may enable Micronaut's distributed configuration client (micronaut.config-client.enabledset totrue, or to any placeholder, which the run time may resolve totrue): alogger.configorlogback.configurationFilethat distributed configuration supplies is not applied while the generated configurator is registered. A client that is enabled in another way cannot be seen and gives no line: by an environment variable, a system property or properties passed toApplicationContext.builder(); by a file that is not on the class path of the request, or that the scan does not read, such as a bootstrap file of another name that themicronaut.bootstrap.namesystem property selects; or by a value that a packaged Groovy file computes, such as fromSystem.getenv.- Returns:
- the lines, unmodifiable, in class path order; empty unless
status()isLogbackPrecompiler.Status.GENERATED
-
entries
The generated entries: the class files and theMETA-INF/services/ch.qos.logback.classic.spi.Configuratorfile, by entry name, in order.The caller writes every entry, by its name, below one directory that is on the application's class path next to its
logback.xml, or adds every entry to one archive. They have to stay together, on the same class loader: the generated configurator calls the classes copied next to it, which are package-private.Removing the output of an earlier build is the caller's job, because only the build tool knows whether a directory is its own. A caller that writes into one of the roots it passes as application output, such as a class directory, has to remove that earlier output before it calls
LogbackPrecompiler.precompile(Request)again, not after: the engine neither replaces nor removes it, and the call isLogbackPrecompiler.Status.FAILEDwhile it is there. The output is the service file and the classes of the packageio.micronaut.aot.logback.generated.- Returns:
- the entries, unmodifiable; empty unless
status()isLogbackPrecompiler.Status.GENERATED
-