Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Logging from within EOL(Feature request and architecture discussion)
Logging from within EOL [message #1850834] Fri, 18 March 2022 05:13 Go to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

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:


  1. 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.
  2. 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.
  3. 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.
  4. JUL is easily adapted to other logging systems.
  5. The implementation of the tool can be sub-set with fragments to support other logging systems directly, if so desired.
  6. 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 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

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 #1850881 is a reply to message #1850878] Sun, 20 March 2022 23:24 Go to previous messageGo to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

Yes. That is a good idea. Is there documentation on how I can access the runtime location from within EOL, as I would need to get that to make the tool work.
Re: Logging from within EOL [message #1850882 is a reply to message #1850881] Sun, 20 March 2022 23:30 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

You'll need to make the tool implement the ITool interface and once you have an instance of EolContext, the following expression should return the current line:

context.getFrameStack().getCurrentStatement().getRegion().getStart().getLine()


Best,
Dimitris
Re: Logging from within EOL [message #1850883 is a reply to message #1850882] Sun, 20 March 2022 23:30 Go to previous messageGo to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

Excellent. Will let you know once I have a draft!
Re: Logging from within EOL [message #1850941 is a reply to message #1850883] Wed, 23 March 2022 03:20 Go to previous messageGo to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

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 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

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
Previous Topic:EVL : How to apply fixes in correct order?
Next Topic:Epsilon Workflow Depends on Apache Ant plugin
Goto Forum:
  


Current Time: Sat Apr 27 11:52:34 GMT 2024

Powered by FUDForum. Page generated in 0.04337 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top