Logging to syslog doesn't log DEBUG

562 views
Skip to first unread message

Dick Visser

unread,
Apr 7, 2016, 6:20:58 AM4/7/16
to simplesamlphp
Hi guys

I'm currently logging to file on our 1.14 IdP.
The relevant config is:

'loggingdir' => 'log/',
'debug' => true,
'debug.validatexml' => true,
'logging.level' => SimpleSAML_Logger::DEBUG,
'logging.handler' => 'file',
'logging.format' => '%srcip %level %stat[%trackid] %msg',
'logging.facility' => defined('LOG_LOCAL5') ? constant('LOG_LOCAL5')
: LOG_USER,
'logging.processname' => 'simplesamlphp',


I've switched to syslog now:

'logging.handler' => 'syslog',


But I'm only getting very basic logging and no DEBUG.
So none of the SAML message are logged to syslog, the LDAP debug isn't
there, etc.

Do I need to configure something else to have DEBUG info logged to syslog?


Thanks!

DIck

Jaime Perez Crespo

unread,
Apr 11, 2016, 9:38:46 AM4/11/16
to simple...@googlegroups.com
Hi Dick!

I’ve just tried in one of my local installations and it works fine, I can see debug logs. Could it be an issue with syslog itself?
--
Jaime Pérez
UNINETT / Feide
mail: jaime...@uninett.no
xmpp: ja...@jabber.uninett.no

"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost

Dick Visser

unread,
Apr 13, 2016, 8:03:00 AM4/13/16
to simplesamlphp
Hi Jaime

Correction: I debug logs work, it's just that I'm missing the SAML
messages in syslog.
This is on a Redhat6 host, and I've just tried on Ubuntu 14.04 where
it is the same.

I'm using the default config:

logging.facility' => defined('LOG_LOCAL5') ? constant('LOG_LOCAL5') : LOG_USER

Dick
> --
> You received this message because you are subscribed to the Google Groups "SimpleSAMLphp" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to simplesamlph...@googlegroups.com.
> To post to this group, send email to simple...@googlegroups.com.
> Visit this group at https://groups.google.com/group/simplesamlphp.
> For more options, visit https://groups.google.com/d/optout.

Jaime Perez Crespo

unread,
Apr 19, 2016, 5:24:38 AM4/19/16
to simple...@googlegroups.com
Hi again Dick! Sorry for the delay!

I’ve just tested again, and I can see all logs, SAML messages included. My configuration is exactly the same as yours, with the format an process name being the only exceptions (and it’s not like those should changing the outcome of the test, anyway).

It’s really strange that you can see debug messages, but not the SAML messages. Could it be that ‘debug’ is being overwritten somewhere later in your configuration? Because if that’s set to false, SAML messages won’t be logged, regardless of what logging level you have set...

On 13 Apr 2016, at 14:02 PM, Dick Visser <dick....@geant.org> wrote:
> Hi Jaime
>
> Correction: I debug logs work, it's just that I'm missing the SAML
> messages in syslog.
> This is on a Redhat6 host, and I've just tried on Ubuntu 14.04 where
> it is the same.
>
> I'm using the default config:
>
> logging.facility' => defined('LOG_LOCAL5') ? constant('LOG_LOCAL5') : LOG_USER

Dick Visser

unread,
May 13, 2016, 11:42:47 AM5/13/16
to simplesamlphp
On Tue, Apr 19, 2016 at 11:24 AM, Jaime Perez Crespo
<jaime...@uninett.no> wrote:
> Hi again Dick! Sorry for the delay!
>
> I’ve just tested again, and I can see all logs, SAML messages included. My configuration is exactly the same as yours, with the format an process name being the only exceptions (and it’s not like those should changing the outcome of the test, anyway).
>
> It’s really strange that you can see debug messages, but not the SAML messages. Could it be that ‘debug’ is being overwritten somewhere later in your configuration? Because if that’s set to false, SAML messages won’t be logged, regardless of what logging level you have set...

I checked that and I could not find anything.
I just tried to simply switch from 'file' to 'syslog' on one of our
other SSP machines and there is works fine - I get SAML messages in
syslog.

Could it be something quirky wrt to a specific OS?
The machine with this issue is Redhat 6 (with PHP 5.3.3).
The machine that works fine is Ubuntu 14.04 (with PHP 5.5.9).

Bit lost still.

Dick

Jaime Perez Crespo

unread,
May 20, 2016, 9:20:11 AM5/20/16
to simple...@googlegroups.com
Hi Dick!

On 13 May 2016, at 17:41 PM, Dick Visser <dick....@geant.org> wrote:
>> It’s really strange that you can see debug messages, but not the SAML messages. Could it be that ‘debug’ is being overwritten somewhere later in your configuration? Because if that’s set to false, SAML messages won’t be logged, regardless of what logging level you have set...
>
> I checked that and I could not find anything.
> I just tried to simply switch from 'file' to 'syslog' on one of our
> other SSP machines and there is works fine - I get SAML messages in
> syslog.

That’s really strange...

> Could it be something quirky wrt to a specific OS?
> The machine with this issue is Redhat 6 (with PHP 5.3.3).
> The machine that works fine is Ubuntu 14.04 (with PHP 5.5.9).

The latter is exactly what I’m using, and I can’t reproduce the issue.

Are you using the exact same configuration (both SSP and syslog) in both systems?
signature.asc

Jaime Perez Crespo

unread,
May 20, 2016, 9:20:22 AM5/20/16
to simple...@googlegroups.com
Hi Dick!

On 13 May 2016, at 17:41 PM, Dick Visser <dick....@geant.org> wrote:
>> It’s really strange that you can see debug messages, but not the SAML messages. Could it be that ‘debug’ is being overwritten somewhere later in your configuration? Because if that’s set to false, SAML messages won’t be logged, regardless of what logging level you have set...
>
> I checked that and I could not find anything.
> I just tried to simply switch from 'file' to 'syslog' on one of our
> other SSP machines and there is works fine - I get SAML messages in
> syslog.

That’s really strange...

> Could it be something quirky wrt to a specific OS?
> The machine with this issue is Redhat 6 (with PHP 5.3.3).
> The machine that works fine is Ubuntu 14.04 (with PHP 5.5.9).

The latter is exactly what I’m using, and I can’t reproduce the issue.

Are you using the exact same configuration (both SSP and syslog) in both systems?

signature.asc
Reply all
Reply to author
Forward
0 new messages