-
Notifications
You must be signed in to change notification settings - Fork 7
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
1465 remove warning #809
1465 remove warning #809
Conversation
@abdelr I do not understand why this code was removed from CORE as this is a service that should also be used in MoBi |
As discussed in Open-Systems-Pharmacology/PK-Sim#1507 the code was duplicated in PKSim and we did not see any reference to it on MoBi. If we would like to use this in MoBi also then we should indeed move it to Core and remove it from PKSim. I would wait for the release though so we could build a new version of our nuget and use the changes in PKSim without any code duplication to avoid forgetting it again. |
@abdelr now that the release is behing us, please add everything back to core as we discussed Don't forget to rebase on develop |
@msevestre Thanks for letting me know. I will start with the changes. One quick question. Did you come to an agreement about the FileLogger? Should we totally replace it by a third party implementation or should we fix the StreamWriter issue? Apart from the logic regarding FileLogger, everything else should be done now. |
OSPSuite.Core.Services.ILogger renamed to IOSPLogger, to avoid confusion with Microsoft.Extensions.Logging.ILogger
@abdelr @georgeDaskalakis |
@msevestre Core should be in its final version now. Please take a look and merge it to develop if you agree with all changes. Also, we need to remove Serilog references and LoggingBuilderExtensions from PKSim since this has been moved to Core. The problem is that the nuget version is a bit strange yet with the naming. Last version is currently 10.0.5-cuhhvhhx and we would need it to be just 10.0.0.5. We need to refine the process now so we could reset the last digit on the version so we could easily update our references in PKSim. |
registerLogging(container); | ||
} | ||
|
||
private static void registerLogging(IContainer container) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep. Well done
|
||
public ILogger GetOrCreateLogger(string categoryName) | ||
{ | ||
var logger = _loggerDict.GetOrAdd(categoryName, (_) => SetupLogger(categoryName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small improvement. Return directly instead of creating a variable
|
||
private ILogger SetupLogger(string categoryName) | ||
{ | ||
ILogger logger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small improvement.
REturn directlu in the using instead of creating a variable outside and returning it
return logger; | ||
} | ||
|
||
private ILogger SetupLogger(string categoryName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not follow our convention. Private method => camelCase => setupLogger
Sorry I had reviewed but forgot to submit my comments. |
@msevestre Thanks! I have just committed the changes you requested. |
Well done |
Don't forget to reset the appveyor flags as discussed |
No description provided.