Re: [openupload-devel] syslog logging info
Status: Beta
Brought to you by:
tsdogs
|
From: Fabio M. <Fab...@ar...> - 2010-03-01 14:36:08
|
Hi Alessandro,
I've tried the solution you suggested without success:
I've modified lib/main.inc.php in this way:
............................................
$this->loglevels['error'] = array('id' => 1, 'syslog' => LOG_ERR );
$this->loglevels['security'] = array('id' => 2, 'syslog' => LOG_WARNING );
$this->loglevels['warning'] = array('id' => 3, 'syslog' => LOG_WARNING );
$this->loglevels['notice'] = array('id' => 4, 'syslog' => LOG_NOTICE );
$this->loglevels['info'] = array('id' => 5, 'syslog' => LOG_INFO );
$this->loglevels['debug'] = array('id' => 9, 'syslog' => LOG_DEBUG );
/* modifica per abilitare syslog su facility LOCAL4
openlog('openupload',LOG_PID | LOG_ODELAY, LOG_LOCAL4);
/* handle magic_quotes at the source */
if (ini_get('magic_quotes_gpc')) {
.............................................
I'm using a Centos 5.4 so, from PHP openlog manual, LOG_LOCAL4 seem to be supported.
And I've added this line at the beginning of syslog.conf:
local4.* /var/log/openupload.log
The file /var/log/openupload.log is automatically created, but it is not filled with openupload log: the system file /var/log/messages still continue to be filled.
Did I insert the row in the correct place in main.inc.php ? Do you think I'm missing something ?
Many thanks in advance for any tips.
Fabio
-----Original Message-----
From: Alessandro Briosi [mailto:ts...@br...]
Sent: venerdì 26 febbraio 2010 14.40
To: OpenUpload Delvel and General talk
Subject: Re: [openupload-devel] syslog logging info
Hi Fabio,
Fabio Macchi ha scritto:
> Hi,
>
> I’ve enabled syslog logging level ‘statistics’, but I can’t figure out
> in which file this events are logged: have I to expect this events in
> /var/log/httpd/access_log ( or /var/log/httpd/ssl_access_log, as I use
> https ) or in a completely separated file ?
>
No, as its syslog the events are logged to the system syslog,
/etc/syslog.conf (or rsyslog.conf or whatever is available on the
system) is used to configure where to log events.
>
> I’d like to forward these events to an external syslog server: any
> suggestion about the best way to separate these events from other ?
>
hmm, probably to do this you need to use the openlog function first [1]
you can use the local0 to 7. For the nature of syslog you cannot define
it based on a process id or name.
rsyslogd should be able to acomplish this with a special filter. [2]
you can put something like this at line 106 of lib/main.inc.php
openlog('openupload',LOG_PID | LOG_ODELAY, LOG_LOCAL7);
Hope this helps,
Alessandro
[1] http://www.php.net/manual/en/function.openlog.php
[2] http://www.rsyslog.com/
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openupload-devel mailing list
Ope...@li...
https://lists.sourceforge.net/lists/listinfo/openupload-devel
|