Just a quick post – if you want to get a realtime view of the log files then you have a few options.
If like me you find opening the latest file and scrolling to the bottom a bit tiresome then the following options might help:
- Dynamic log viewer – I discovered this tool as this ships with SIM – alternatively you can download the exe from http://www.softpedia.com/get/Office-tools/Text-editors/Dynamic-Log-Viewer.shtml. You need to select the latest file and it then watches the tail of the log file
- DebugView – you need a couple things – the download from https://technet.microsoft.com/en-us/sysinternals/debugview.aspx and a slight tweak to your log4net config to add a new appender (see below). The advantage here is the log always updates, you don’t need to select a new file each rebuild. When you run the app,
- Run as an administrator
- Turn on ‘Capture -> Capture Global Win32’
- Add a filter to match your config – ‘Edit -> Filter/Highlight -> Include – [xDBPrototype]‘
The new config you need adds a new appender into the <log4net> section of the web.config/sitecore.config (depending on your version of Sitecore):
1 2 3 4 5 6 7 8 9 10 |
<appender name="OutputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender, Sitecore.Logging" > <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="[xDBPrototype] %4t %d{ABSOLUTE} %-5p %m%n" /> </layout> </appender> <root> <priority value="INFO" /> <appender-ref ref="LogFileAppender" /> <appender-ref ref="OutputDebugStringAppender" /> </root> |
Enjoy
I use this, a very small exe that does not need installing: https://www.baremetalsoft.com/baretail/
Great option!
I’ve also found out about Sitecore’s Rolling File Appender, and mentioned how it can be used here:-
http://www.seanholmesby.com/real-time-auto-reload-logging-with-sitecores-rolling-file-appender/
Like Kamruz, I also use Baretail, so this works perfectly for me.
Cheers,
Sean
alternatively try Debugview++
https://github.com/CobaltFusion/DebugViewPP#screenshot