<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Gurock Software Support Forum - Rollover of logs]]></title>
	<link rel="self" href="http://forum.gurock.com/feed/atom/topic/358/"/>
	<updated>2010-03-04T14:50:04Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.gurock.com/topic/358/rollover-of-logs/</id>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1112/#p1112"/>
			<content type="html"><![CDATA[<p>Hi Andrei,</p><p>here&#039;s the promised diff:</p><div class="codebox"><pre><code>FileProtocol.cs, line 627:
- if (this.fRotater.Update(DateTime.UtcNow))
+ if (this.fRotater.Update(DateTime.Now))

FileHelper.cs, line 172:
- DateTime.UtcNow.ToString(DATETIME_FORMAT),
+ DateTime.Now.ToString(DATETIME_FORMAT),

FileHelper.cs, lines 116-117:
- Int32.Parse(values[5]) /* Second */
+ Int32.Parse(values[5]), /* Second */
+ DateTimeKind.Local</code></pre></div><p>I&#039;ve tested the changes and they work as expected. Hope this helps.</p><p>Regards,<br />Tobias</p>]]></content>
			<author>
				<name><![CDATA[tgurock]]></name>
				<uri>http://forum.gurock.com/user/4/</uri>
			</author>
			<updated>2010-03-04T14:50:04Z</updated>
			<id>http://forum.gurock.com/post/1112/#p1112</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1111/#p1111"/>
			<content type="html"><![CDATA[<p>Hi Andrei,</p><p>I will prepare a full diff with the necessary changes until tomorrow. It&#039;s basically just changing DateTime.UtcNow to DateTime.Now but there is one other location that needs to be modified as well and which is a bit more complicated.</p><p>Regards,<br />Tobias</p>]]></content>
			<author>
				<name><![CDATA[tgurock]]></name>
				<uri>http://forum.gurock.com/user/4/</uri>
			</author>
			<updated>2010-03-03T18:32:51Z</updated>
			<id>http://forum.gurock.com/post/1111/#p1111</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1110/#p1110"/>
			<content type="html"><![CDATA[<p>Thanks . I will give it a try</p>]]></content>
			<author>
				<name><![CDATA[Andrei]]></name>
			</author>
			<updated>2010-03-03T13:16:43Z</updated>
			<id>http://forum.gurock.com/post/1110/#p1110</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1109/#p1109"/>
			<content type="html"><![CDATA[<p>The link works now, sorry. We currently do not have an eta, but definitely not years. :-)</p><p>As another alternative to writing a custom protocol, you could also modify the library itself (it&#039;s just changing 2-3 lines from DateTime.UtcNow to DateTime.Now) and recompile it. Let me know in case you want to do this. Of course, the problem with this option is that you need to reapply your changes for every update that comes out.</p><p>Regards,<br />Tobias</p>]]></content>
			<author>
				<name><![CDATA[tgurock]]></name>
				<uri>http://forum.gurock.com/user/4/</uri>
			</author>
			<updated>2010-03-01T13:12:24Z</updated>
			<id>http://forum.gurock.com/post/1109/#p1109</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1108/#p1108"/>
			<content type="html"><![CDATA[<p>Thanks<br />The link seems to be broken - 404 error<br />Do you have an Eta on the new cersion , weeks, months or years ?</p><p>Andrei</p>]]></content>
			<author>
				<name><![CDATA[Andrei]]></name>
			</author>
			<updated>2010-03-01T12:33:32Z</updated>
			<id>http://forum.gurock.com/post/1108/#p1108</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1107/#p1107"/>
			<content type="html"><![CDATA[<p>There&#039;s currently no way to intercept and customize this specific feature but you can always add and use your own custom file protocol implementation. It&#039;s a bit of work but you could use the existing FileProtocol as reference (we also have an article which explains how to write custom protocols: <a href="http://www.gurock.com/smartinspect/using-custom-protocols-with-the-smartinspect-libraries.a.html">http://www.gurock.com/smartinspect/usin … ies.a.html</a>)</p><p>However, I think we will add an option for using UTC or local time to the next version and if this is a non-critical issue for you, I would just recommend waiting for the next release. </p><p>Regards,<br />Tobias</p>]]></content>
			<author>
				<name><![CDATA[tgurock]]></name>
				<uri>http://forum.gurock.com/user/4/</uri>
			</author>
			<updated>2010-03-01T10:32:07Z</updated>
			<id>http://forum.gurock.com/post/1107/#p1107</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1106/#p1106"/>
			<content type="html"><![CDATA[<p>Is there any way where we can intercept the rollover and file name logic of Smart inspect as our previous library (home grown) had all of these features </p><p>I am happy to share this code with you if you like ?<br />Thanks</p><p>Andrei</p>]]></content>
			<author>
				<name><![CDATA[Andrei]]></name>
			</author>
			<updated>2010-02-27T22:47:03Z</updated>
			<id>http://forum.gurock.com/post/1106/#p1106</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1103/#p1103"/>
			<content type="html"><![CDATA[<p>Hello Andrei,</p><p>Thanks for your post. There&#039;s currently no option to use the local time in log file names instead of UTC. The reason for using UTC is that it&#039;s independent of time zone and especially daylight saving changes (which may cause issues for long running applications otherwise). </p><p>Regards,<br />Tobias</p>]]></content>
			<author>
				<name><![CDATA[tgurock]]></name>
				<uri>http://forum.gurock.com/user/4/</uri>
			</author>
			<updated>2010-02-26T13:08:13Z</updated>
			<id>http://forum.gurock.com/post/1103/#p1103</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Rollover of logs]]></title>
			<link rel="alternate" href="http://forum.gurock.com/post/1102/#p1102"/>
			<content type="html"><![CDATA[<p>Hi</p><p>We are using smart inspect and have been noticiing that the roolover of logs seems to be based on UTC and not local time. ?</p><p>Is there a way we can force rollover at local time ie midnight.</p><p>Our connections string is <br />&quot;tcp(reconnect=true,async.enabled=true,reconnect.interval=10),Text(append=true, async.enabled=true, filename=&quot; &amp; IO.Path.Combine(LogFilePath, LogFileName) &amp; &quot;,maxparts=1, indent=true, reconnect=true, rotate=daily, pattern=[%timestamp%] %logentrytype% %session%[%thread%] : %title% )&quot;</p><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[Andrei]]></name>
			</author>
			<updated>2010-02-26T09:25:39Z</updated>
			<id>http://forum.gurock.com/post/1102/#p1102</id>
		</entry>
</feed>

