Vulnerability in EPiServer.Forms
I would like to log information from single class (not Errors, just INFO kind of messages) on DXP
Is there a way how to do it?
I read this article about logging: "Logging into .Net Diagnostics Trace"
But it didn't make me any clever:)
Is there any more descriptive article or can someone point me to the right direction?
Thank you & Best regards
private static readonly ILogger Logger = LogManager.GetLogger();
And in the Integration environment you can change the log level from Error to Information yourself in the Azure Portal:App Service -> Monitoring -> App Service Logs -> Level.
To change default log level for your other environments, you will need to create a support ticket.
But it will change the level of logging for the whole app, right? and also it will log in the same "file" (I know I didn't say it earlier).
I am thinking that in this peticular case it is probably OK to log information in the same log file as the rest of error log, but still... I don't want to log everything from the INFO level for the whole app, just the one class.
And generally: Is there a way how to log a certain level in some part of app to a different log file?
Install the Application Insights SDK, replace the logger factory that DXP configures automatically, and implement your own that returns a logger that logs both to Application Insights and System.Diagnostics. In the AI SDK you can configure which namespaces should always log, logging level, sampling and whatnot.
Thank you Johan