Can anyone please suggest best practices to log errors into database using existing log4net in DXC environment?
As of now, Default DXC environment logging is enabled but i want to override and save to database for better use. so i can also log any DEBUG or information logs as well into database.
Logging into database is generally not a good idea, especially in managed environments like DXC. if you are logging too much you can bring down your database. Why would you want to log DEBUG/INFO messages to database?
For better accessing the logs i am thinking to go for database. Is there any better way of logging DEBUG/INFO messages into DXC environment? Can you please suggest?
Currently, i have implemented lot of transactional operations apart from regular CMS features. So sometimes i need to log the output of anyone of transaction method to troubleshoot any response.
You can configure Log4net database appender to achieve what you need. As Quan said previously, it's not a good idea and recommended. From memory, the PAAS portal has provided access to Application Log from both stream and csv export. If you have Azure portal access, you can access to application insight as well.
Yes i am able to access the logs from paasportal. But these are error logs.
As of now it is only logging errors. Is there any way of logging any DEBUG/INFO logs into DXC environment?
I believe you can set the logging level, as well as connect to the logging stream for such information https://world.episerver.com/digital-experience-cloud-service/development-considerations/logging/