delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/06/01/10:08:51

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=edoJUWKh+v4++b/d
MN2bEMS1baLVJveXLnBXhMV/Y07rq2GkKfyfbwbzUXzv2sGTcH+iTy+a8SyORCQT
zY9q6Pq+PhwhmSkWKkTRsNBvELddNrgZftRGdP9yG7ttuOzSyBc0lO2aullams9h
kSysdQkTEi2UFGNaD+H6BrAVbYQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=u7AS8BAWpvznsuWoSjl1Fe
3PbLs=; b=Ephupgk/9BrrdXX/OCzH58X328ESjOya9eRaYoYBcJXF55Cm+2u2WV
rqOzk7QNnj7DBMz8/O2TErQ61iPDtgjOYix7ryNvuI4Od6mKQZ/csSBF4qdKPgNq
mJqDGvQEL61iLyKETZ898y6S8j4RaQkB8HL0qihrm4XVop551qW84=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=expertise, USER, Articles
X-HELO: smtp-out-so.shaw.ca
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: Logs from logger don't appear in EventLog
To: cygwin AT cygwin DOT com
References: <CAAoTqfuFnTfRsO42FYTo=h1qcvR3Z7NBBhXMexcoyn7EQRwB7g AT mail DOT gmail DOT com> <CAAoTqfsmdD2bsrr4ADtZfEQnatUxQZ3tkSDQGM4VnK5WO3f6qQ AT mail DOT gmail DOT com> <CAAoTqftL4dVJSPTt=HUsSsVGa0i5F3uJcGpEY-_tujgNaZXUbg AT mail DOT gmail DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Openpgp: preference=signencrypt
Message-ID: <971084dc-5712-08bf-5797-63818d3055a0@SystematicSw.ab.ca>
Date: Sat, 1 Jun 2019 08:08:35 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0
MIME-Version: 1.0
In-Reply-To: <CAAoTqftL4dVJSPTt=HUsSsVGa0i5F3uJcGpEY-_tujgNaZXUbg@mail.gmail.com>
X-IsSubscribed: yes

On 2019-06-01 00:14, Pavel Timofeev wrote:
> ср, 29 мая 2019 г. в 16:40, Pavel Timofeev:
>> вт, 28 мая 2019 г., 19:41 Pavel Timofeev:
>>> I see here and there that if any kind of syslog daemon is not
>>> installed in Cygwin all messages sent to syslog will appear in
>>> EventLog.
>>> I couldn't find a documentation piece about how (and when) logging
>>> work in Cygwin, only some emails in maillists.
>>> Ok, here is my problem. I install cygwin on Windows 2008 R2 x64. Then
>>> I install only two services in Cygwin: cron and sshd. No syslog daemon
>>> at all. I want to see all syslog messages in EventLog.
>>> And I see messages from sshd and cron in EventLog, but when I run
>>> logger utility I can't see them in EventLog:
>>>      /usr/bin/logger BLABLA
>>> Am I missing something that matters? I need your help and expertise!
>> Sorry, cygwin version 3.0.7, fresh installation with latest available packages
> Just installed cygwin 3.0.7 on my home Windows 10.
> No luck, no any messages from logger in any EventLog.

Works fine for me with syslog-ng syslogd:
$ ls -lF /dev/log
srw-rw-rw- 1 SYSTEM SYSTEM 0 May 29 22:37 /dev/log=
$ logger test
$ tail -1 /var/log/syslog | cygcheck-hrsv.sed
Jun  1 07:04:52 $HOSTNAME $USER: test

As logger sends messages to /dev/log which may be a regular file, not a UNIX
domain socket, or syslog UDP socket on port 514, in syslog format, rather than
calling openlog/closelog/syslog(3), the messages may not go to the fallback
Windows Event Log.

You should ensure that /dev/log does not exist as a regular file, as that could
affect logging:
$ ls -lF /dev/log
If not a socket (= flag), check the contents for your logging tests.
Then delete /dev/log, and retest.

You may need to run something like:
https://www.codeproject.com/Articles/18086/Syslog-daemon-for-Windows-Eventlog
to put syslog messages into the Windows Event Log.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019