Logging from within EOL [message #1850834] |
Fri, 18 March 2022 05:13 |
|
When using EOL for non-trivial work, especially in workflows, it would be useful to have a means to log properly.
I propose that logging be implemented using an optional Epilson tool that binds to JUL.
Reasons:
- EOL has the concept of modules and operations, and line numbers, which can be equated to the sourceClass and sourceMethod properties of the LogRecord. This means all down-stream tooling will receive precise logging information.
- EOL is loosely tied to Java, so we can generally assume that Java's default logging infrastructure is present or easy to obtain. Other loggers require libraries, increasing complexity and foot-print for off-the-shelf use.
- The expression of the logger as a tool does not tie EOL to the Java language. Nor does it add features to the language that would need porting for say an EOL on .Net CLR.
- JUL is easily adapted to other logging systems.
- The implementation of the tool can be sub-set with fragments to support other logging systems directly, if so desired.
- This approach also provides for the use of resource bundles in EOL, allowing access to end-user i18n facilities required for feedback. Not everyone speaks English, after all.
I further propose to build one fragment contributed through the workflow plugin that will adapt the logger to the ant logger's levels if EOL languages are run in a workflow. This is will provide implicit support for logging in ant, without sacrificing language independence or build platform indepence.
[Updated on: Fri, 18 March 2022 05:18] Report message to a moderator
|
|
|
Re: Logging from within EOL [message #1850878 is a reply to message #1850834] |
Sun, 20 March 2022 20:01 |
|
Hi Jörn,
I agree that such a tool would be useful. As implementing a new tool should not require changes to the rest of Epsilon, would you be able to prototype this in a GitHub repo at this stage?
Best,
Dimitris
|
|
|
|
|
|
Re: Logging from within EOL [message #1850941 is a reply to message #1850883] |
Wed, 23 March 2022 03:20 |
|
I have a design impasse. The JUL logger space is hierarchical. The module space of EOL has relative paths and platform URLs. What is the function to map module name to JUL logger name? Or should the logger be explicitly set through the tool?
|
|
|
Re: Logging from within EOL [message #1850951 is a reply to message #1850941] |
Wed, 23 March 2022 09:54 |
|
The closest to a module name in EOL would be the name of its source file (in case it's an imported file, one can navigate to the root module through getParentModule()). How about using this a default module name but also allowing users to override it through an explicit argument in the tool?
Best,
Dimitris
|
|
|
Powered by
FUDForum. Page generated in 0.04337 seconds