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

Avoid abbreviations: add methods error, warning, info and success #162

Open
nununo opened this issue Feb 21, 2024 · 3 comments
Open

Avoid abbreviations: add methods error, warning, info and success #162

nununo opened this issue Feb 21, 2024 · 3 comments

Comments

@nununo
Copy link

nununo commented Feb 21, 2024

In light of the Clean ABAP guidelines that tells us to avoid abbreviations, would it be possible to also have methods error(), warning(), info() and successl()? Maybe as simple wrappers which call the existing ones?

@AlexandreHT
Copy link
Contributor

I agree on the principle but I think we should keep the I, S, W, E, A as aliases because these are messages parameters on their own.
I'd be also in favour of adding X (by principle) and '' which is an undocumentd message type (grey led icon) that I use for recording user inputs (in RF transactions)
which would give us the following proposition:

Message type / Alias Method name RFC 5424 equivalent
debug 7 - Debug
I info 6 - Informational
S success 5 - Notice
W warning 4 - Warning
E error 3 - Error
A termination or abend or abnormal_end 2 - Critical
X Exit 1 - Alert

References :

@kjetil-kilhavn
Copy link
Contributor

kjetil-kilhavn commented Jun 5, 2024

I agree with the original poster, and would suggest abort as the method name for message type a.
For the sake of readability I think log->exit( ) is better than log->x( ) and even log->warning( ) is worth the extra characters.

Update: Mike undeniably has a good argument about the double meaning - so abend is probably the best and has roots all the way back to mainframes.

@pokrakam
Copy link
Contributor

pokrakam commented Jun 5, 2024

I'm biased towards abend because it means evening in German so it has a nice double meaning. But it's is also common enough terminology, so that gets my vote.

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

4 participants