Setting uSignalrAppender wrongly up in log4net.config
Hi
The installer seems to setup the appender wrong in the log4net.config. Both the appender-ref and appender tags are inserted INTO the existing tags instead og NEXT TO. See my config here:
Arrrrgghhhh! I thought that was fixed. I am using the package actions contrib update xml file as post install action. I have it set to add the updates to the end of appender and appender-ref nodes basically i have
Hmm.. I haven't used PAC before but maybe the xpath for the appender-ref should be "//root", specifying that the snippet should be appended to the end of the "root" element? And the appender likewise, xpath="/log4net"?
Setting uSignalrAppender wrongly up in log4net.config
Hi
The installer seems to setup the appender wrong in the log4net.config. Both the appender-ref and appender tags are inserted INTO the existing tags instead og NEXT TO. See my config here:
<?xml version="1.0"?> <log4net> <root> <priority value="Info" /> <appender-ref ref="AsynchronousLog4NetAppender"> <appender-ref ref="uSignalrAppender" /> </appender-ref> </root> <!--To Change the way logging works for certain namespaces, insert a new logger like: --> <!-- <logger name="Umbraco.Core"> <level value="WARN" /> </logger>--> <appender name="AsynchronousLog4NetAppender" type="Umbraco.Core.Logging.AsynchronousRollingFileAppender, Umbraco.Core"> <file value="App_Data\Logs\UmbracoTraceLog.txt" /> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <maximumFileSize value="5MB" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" /> </layout> <appender name="uSignalrAppender" type="USignalrLog4net.SignalrAppender"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %-5level - %message%newline" /> </layout> </appender> </appender> </log4net>This prevents logging to signalr
/Bo
Bo,
Arrrrgghhhh! I thought that was fixed. I am using the package actions contrib update xml file as post install action. I have it set to add the updates to the end of appender and appender-ref nodes basically i have
<Action runat="install" undo="false" alias="AddXmlFragment" file="~/config/log4net.config" xpath="//root/appender-ref" position="end"> <appender-ref ref="uSignalrAppender"></appender-ref> </Action> <Action runat="install" undo="false" alias="AddXmlFragment" file="~/config/log4net.config" xpath="//appender" position="end"> <appender name="uSignalrAppender" type="USignalrLog4net.SignalrAppender"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %-5level - %message%newline" /> </layout> </appender> </Action>Not sure why its adding it in the wrong place?? Just move it out into its proper place and it should work.
Regards
Ismail
Hmm.. I haven't used PAC before but maybe the xpath for the appender-ref should be "//root", specifying that the snippet should be appended to the end of the "root" element? And the appender likewise, xpath="/log4net"?
Just a thought
/Bo
Hello Bo.
I would recommend installing LiveLogger via nuget now
https://nuget.org/packages/LiveLogger.Umbraco
Cheers,
Warren :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.