Last active
March 28, 2023 16:21
-
-
Save dsolovay/837b839528b5847f13bfb10b10a0bb55 to your computer and use it in GitHub Desktop.
Write ShowConfig to log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<initialize> | |
<processor type="Sitecore.SharedSource.Pipelines.WriteShowConfigToLog.Processor, Sitecore.SharedSource.WritreShowConfig" patch:before="processor[1]"/> | |
</initialize> | |
</pipelines> | |
</sitecore> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.Pipelines; | |
namespace Sitecore.SharedSource.WriteShowConfigToLog | |
{ | |
public class Processor | |
{ | |
public void Process(PipelineArgs arg) | |
{ | |
Write("************************"); | |
Write("BEGIN SHOW CONFIG"); | |
Write("************************"); | |
Write(Sitecore.Configuration.Factory.GetConfiguration().OuterXml); | |
Write("************************"); | |
Write("END SHOW CONFIG"); | |
Write("************************"); | |
} | |
private void Write(string message) | |
{ | |
Sitecore.Diagnostics.Log.Info(message, this); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment