php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41526 Syslog add program to the log message (not duplicate of #36808)
Submitted: 2007-05-29 08:07 UTC Modified: 2007-05-29 12:19 UTC
From: vermersch+php at gmail dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.2.2 OS: Linux Ubuntu feisty
Private report: No CVE-ID: None
 [2007-05-29 08:07 UTC] vermersch+php at gmail dot com
Description:
------------
I use syslog-ng as logging system and call it with php to log my exact message.
The problem is that PHP add the ident string of my openlog to the message.

My syslog-ng destination is configured like this :
destination testing { 
	file(
		"/server/alpha/myapp/testing.log" 
		template("$MESSAGE\n")
	);
};
log {
	source(s_all);
	destination(testing);
};
If I leave the ident string empty, I still have the : added


Reproduce code:
---------------
function syslog($logFacility = false) {
	$r = openlog("testing", LOG_CONS, LOG_USER);
	if(!$r) return false;
	$r = syslog(LOG_NOTICE, "my message to log");
	if(!$r) return false;
	closelog();
}

Expected result:
----------------
The result I expect is : 
my message to log
without any garbage

Actual result:
--------------
The actual result is :
testing: my message to log


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-29 09:31 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2007-05-29 12:19 UTC] vermersch+php at gmail dot com
The same call with perl works well, it only writes my message.
That's why I think it's a php problem.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 04:01:33 2024 UTC