Closed KKacer closed 4 years ago
Yes, remove Serilog from usings at the top of the file, and use full namespace in place, like:
Serilog.Log.Information("Something");
Aha! :D right, forgot that could use it this way.
Changed that but found that it will conflict with all the logs inside all the libraries, if the name was LogAttribute it could prevent that. but currently I decided to use another name instead of Log to prevent the need to change all the Log.Somethings in the codes.
Why not rename it to LogAttribute or LogCallAttribute?
Still didn't try LogAttribute which guess will work, at first thought maybe it is not possible via your code or you don't suggest that, cause you didn't use 'Attribute' in the names, guessed may cause some troubles in your library, e.g if you were trimming names, ...
Update: yes, attribute fixed the issue with naming conflicts.
@KKacer it is just personal preference - not to use ...Attribute suffix. As for AspectInjector - it is designed in a way "if it compiles - it is valid code for AspectInjector"
Yes got it, said that just to clarify why I worried and avoided using 'Attribute' at first, but as you said it worked. All fine, thanks.
I have this code:
As the
Log.Information
is part of Serilog, it will conflict if I want to make the attribute named Log not LogCall, though I prefer to name it as Log. Do you know a simple way to be able to name that attribute just [Log]?Regards.