Actually I need to setup failover with 3 node clustering (Just failover not loadbalncing), And, I need to centralise the logging on a shared drive, for media it is working perfectly fine, but for logging with below settings seems not working, do you have any idea?
To read the logs in umbraco logviewer from an external path, it's necessary to override the SerilogJsonLogViewer.cs class and inject the updated external path into the implementation. Make sure to register the dependency in composer.
I am using Umbraco 10 for .Net Core application and i was having requirement to save the logs on some shared location and your above solution worked. However now the problem is, in addition to the shared location, the logs are getting saved into the default location as well i.e. in umbraco/logs folder. So we can say that the logs are getting saved into two locations(shared folder and default folder) which is not deal.
Could you please suggest if there is any configuration available to stop saving the logs into the default location i.e. umbraco/logs folder.
Logging custom directory path which is outside of the webroot not working
Hi Umbracians,
I am trying to provide a custom directory path which is outside of the webroot, lets say shared drive, like stated here https://docs.umbraco.com/umbraco-cms/reference/configuration/loggingsettings, but still umbraco writes and read from the old path, what am i missing here?
Actually I need to setup failover with 3 node clustering (Just failover not loadbalncing), And, I need to centralise the logging on a shared drive, for media it is working perfectly fine, but for logging with below settings seems not working, do you have any idea?
it seems logging directory option is not available on umbraco 10 version https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/reference/configuration/loggingsettings
Umbraco 13 : https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Core/Configuration/Models/LoggingSettings.cs
Umbraco 10 : https://github.com/umbraco/Umbraco-CMS/blob/v10/dev/src/Umbraco.Core/Configuration/Models/LoggingSettings.cs
A viable workaround solution involves leveraging Serilog sinks to facilitate writing logs to external paths.
An illustrative example of configuring the Serilog file sync through app settings is provided below:
An example for the serilog file sync appsetting config is below
To read the logs in umbraco logviewer from an external path, it's necessary to override the SerilogJsonLogViewer.cs class and inject the updated external path into the implementation. Make sure to register the dependency in composer.
Hi Nijaz,
I am using Umbraco 10 for .Net Core application and i was having requirement to save the logs on some shared location and your above solution worked. However now the problem is, in addition to the shared location, the logs are getting saved into the default location as well i.e. in umbraco/logs folder. So we can say that the logs are getting saved into two locations(shared folder and default folder) which is not deal.
Could you please suggest if there is any configuration available to stop saving the logs into the default location i.e. umbraco/logs folder.
Thanks, Ashish
is working on a reply...