Req #69561 [Asn]: FPM access.log strftime locale not configurable

From: Date: Fri, 01 May 2015 22:27:08 +0000
Subject: Req #69561 [Asn]: FPM access.log strftime locale not configurable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192452@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69561&edit=1

 ID:                 69561
 Updated by:         rasmus@php.net
 Reported by:        mb at lunetics dot com
 Summary:            FPM access.log strftime locale not configurable
 Status:             Assigned
 Type:               Feature/Change Request
 Package:            FPM related
 Operating System:   FreeBSD 10.1
 PHP Version:        5.6.8
 Assigned To:        fat
 Block user comment: N
 Private report:     N

 New Comment:

This is because fpm logs before rshutdown is called for some reason. We reset the locale in
rshutdown and other sapis will log after shutdown.

eg.

https://github.com/php/php-src/blob/php-5.6.8/sapi/fpm/fpm/fpm_main.c#L1987-L1992

It should be safe to change that order


Previous Comments:
------------------------------------------------------------------------
[2015-05-01 21:27:21] mb at lunetics dot com

Okay, did some further testing.

So somewhere hidden there's a 

setlocale(LC_ALL, 'de_DE.ISO8859-1', 'de_DE.ISO8859-15E');

call. So the current scripts Locale seems to affect the log output (which should be mostly English
in my opinion)

So it would be more a feature request having a custom locale for the fpm access.log strftime locale.

------------------------------------------------------------------------
[2015-05-01 21:06:49] mb at lunetics dot com

Description:
------------
It seems the access.log / php-fpm directive "guesses" the locale from the timezone set?

Systemtimezone is set to "Europe/Berlin" -> strftime %b -> "Mai"

tried setting the timezone to "Europe/London" -> strftime %b -> "Mail"


Would it be possible to set the locale for the access.log strftime parsing?



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69561&edit=1


Thread (5 messages)

« previous php.bugs (#192452) next »