Windows: Rotating the log file

RayG rgsub1 at btinternet.com
Thu Jan 14 17:10:51 UTC 2021


Hi George,

Ah! - I had not thought of that method 😊 apologies

Tested, and it will do the job nicely - just need to do a bit of programming and all will be well.

It has the added bonus (perhaps) if you set the access permissions correctly there is not need for admin privs.

RayG
-----Original Message-----
From: George Thessalonikefs <george at nlnetlabs.nl> 
Sent: 13 January 2021 18:17
To: unbound-users at lists.nlnetlabs.nl
Subject: Re: Windows: Rotating the log file

Hi RayG,

My colleague Wouter suggested the following and I believe it will work on Windows (haven't tested; not a windows user):

1.
`unbound-control.exe set_option logfile: unbound-2.log` this will change the value for the logfile in the unbound *running* configuration.

2.
`unbound-control.exe log_reopen`
this tells unbound to end the old logfile and switch logging to unbound-2.log and then starts writing to the new file.

This is of course not automated and not configurable but you can script it and rotate however you want.

Note that during 1 above I would also change the value in the configuration file itself so that the last logfile value is saved for a restart.

Hope that helps.

Best regards,
-- George


On 13/01/2021 17:56, RayG via Unbound-users wrote:
> Hi Jaap
> 
> So who in NLnetlabs works on Windows?
> 
> Someone must know how the offering for windows works, it is a downloadable offering on your website and works well from what I have seen.
> 
> RayG
> 
> -----Original Message-----
> From: Jaap Akkerhuis <jaap at NLnetLabs.nl>
> Sent: 13 January 2021 15:28
> To: RayG <rgsub1 at btinternet.com>
> Cc: unbound-users at lists.nlnetlabs.nl
> Subject: Re: Windows: Rotating the log file
> 
>   "RayG" writes:
> 
>   > Having installed a syslog server on my system and as far as I can tell its working in itself. What I cannot find out is where unbound it trying to send messages to. At this point in time it would appear to be the event log which is not what I was expecting use_syslog I would have expected it to go to the local system UDP/TCP on port 514 but that does not seem to be happening.
>   >
>   > It is not at all helpful to clutter up the eventlog Administrative events with a whole load of unbound error messages (these come from "REFUSED" lookups.
> 
> So that apparently listens to port 514.
>   >
>   > Thinking about this further I would perhaps have expected to see some form of configuration as to where to send syslog messages but again I have found no useful information.
>   >
>   > So I have to say at this time the windows implementation writing to a physical file seems to be the best option.
>   >
>   > Perhaps Jaap can shed some light on how syslog is supposed to work on windows and what I can do to facilitate rotating log files given that most of what I have tried and has been suggested has not resulted in a positive outcome.
>   >
> 
> No, I cann't. I'm not a Windows user so I wouldn't know. If nobody else on this list answers, I suggest you take this to a "how to run windows" list. Or just try google.
> 
> 	jaao
> 
>   >
>   > -----Original Message-----
>   > From: Joe Abley <jabley at hopcount.ca>  > Sent: 12 January 2021 16:55  > To: RayG <rgsub1 at btinternet.com>  > Cc: unbound-users at lists.nlnetlabs.nl  > Subject: Re: Windows: Rotating the log file  >  > On 12 Jan 2021, at 11:53, RayG via Unbound-users <unbound-users at lists.nlnetlabs.nl> wrote:
>   >
>   > > I took a look at some of those offerings and there does not seem to be  > > a "free" one at all. They all want money and at £100 or there abouts,  > > that's a bit too much just to get unbound's logging to rotate neatly.
>   > >
>   > > I did try and install one and from what I understand, I comment the "#  > > logfile:" entry and enable the "use-syslog: yes" and it should all  > > work. But I had no luck in getting this to function as it should.
>   >
>   > Perhaps consider whether Windows is the best platform to be running unbound on?
>   >
>   >
>   > Joe
>   >
>   >
>   >
> 
> 




More information about the Unbound-users mailing list