Log cycle

Does getEventStore log cycle, i.e. delete logs older than x days?

Thanks

jP

You can configure this its just nlog. https://github.com/nlog/NLog/wiki/Configuration-file

Thanks Greg,

On a related note, I have a 3 node cluster in Windows. When I setup with the default log.config getEventStore logs to the appropriate file location. When I change the log.config to log to Event Viewer, then restart the service, getEventStore doesn’t log to Windows Event Viewer… so, I revert the change back to the original log.config, restart the service and now nothing is getting logged to either file or Event Viewer. I’m on v4.0.2. Anything I’m missing?

Thanks

You have not provided enough information to make any determination. I just tried what you said and it worked.

Hi,

Steps:

Create a 3 node cluster in Windows 2016 (I’m in Azure) using ES v4.0.2. My config file looks like this…

Db: F:\EventStore\Data

ExtIp: xx.xx.xx.xx

ClusterSize: 3

DiscoverViaDns: false

RunProjections: All

IntHttpPort: 2113

IntTcpPort: 1113

GossipSeed: xx.xx.xx.yy:2113,xx.xx.xx.zz:2113

StartStandardProjections: true

ExtTcpPort: 1112

Log: C:\Logs\EventStore

IntIP: xx.xx.xx.xx

ExtHttpPort: 2114

The default log.config has the following lines which works well and outputs logs to C:\Logs\EventStore

<target name="errorFileLog" xsi:type="FilteringWrapper" condition="length('${exception}')>0 || level==LogLevel.Error || level==LogLevel.Fatal">
</target>

**I log onto one node in the cluster. **

I create an Application event source using the following PowerShell… New-EventLog -LogName Application -Source ‘GetEventStore’

I then change the above log.config lines to…

<target name="errorFileLog" xsi:type="FilteringWrapper" condition="length('${exception}')>0 || level==LogLevel.Error || level==LogLevel.Fatal">
</target>

…then restart the Windows service.

Nothing is getting logged to windows event log.

I then revert the above change, then restart the windows service, expecting the logs to be written to C:\Logs\EventStore, but now nothing is getting logged at all.

Additionally, I’m using nssm.exe to wrap getEventStore as a service.

I hope that’s enough information.

Cheers

</target>

Would only log error or fatal levels no?

I tried setting it to LogLevel.Trace, but got nothing.