[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Web openvpn.net

Re: [Openvpn-users] log file directive stops stdout ?

  • Subject: Re: [Openvpn-users] log file directive stops stdout ?
  • From: James Yonan <jim@xxxxxxxxx>
  • Date: Tue, 14 Dec 2004 02:02:48 -0700 (MST)

On Mon, 13 Dec 2004, Steven Palm wrote:

> If I specify a "log <file>" directive in my config file, I stop getting 
> anything on stdout. Is this normal?

Yes, --log and --log-append redirect standard output and standard error to
the file.  The redirection is done so that called scripts will also
inherit the redirection.

> I'd really rather have both, but 
> perhaps I'll have to capture the log information via the management 
> interface and create my own log file so I can maintain stdout display. 
> The other odd thing here is that I'm launching this from an NSTask() 
> object in the Cocoa frameworks on MacOS X. This initiates a "callback" 
> to one of my methods when data comes in on STDIN. When I have the log 
> directive, nothing *visible* comes to stdout, but I get a constant and 
> endless stream of 0-byte calls from NSTask as though I'm getting a ton 
> of nothing on STDOUT from the program.

You should see a lot of output to stdout (redirected of course), but they
shouldn't be 0 byte writes.  I just did an strace openvpn --verb 9 --log
log ... (on Linux) and didn't see any evidence of 0 byte writes being made
to stdout.

> I think I'll fix both by just using the log from the management 
> interface, but I thought it wouldn't hurt to mention it.

Yes, I would recommend that.


Openvpn-users mailing list