Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new method get() instead of new() and open() with rename of desc field #69

Closed
anuragguptagithub opened this issue Dec 22, 2020 · 1 comment

Comments

@anuragguptagithub
Copy link

Hi Guys

Comparing with other modern languages, I think we should not have two methods , one to create log with new and other to open it . One should think of a simple method like get() which returns the log object if it does not exists based on the desc ( external number ) field.
Also, desc field should not be meant for description but it is close to being like log handle. generally in Java or Python, the logger takes class name or prgram name to log all its messages, and thats how one would know in a log file about where the log comes.
The desc should by default have sy-repid as input but it could be different based of complex application like a transaction id throughout a transaction.

@AlexandreHT
Copy link
Contributor

Hi,
Some would say that a get method that doesn't not find an entry in the persistence layer should return an exception. I prefer to leave that choice to the code that calls that ABAP-Logger library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants