Activation logs Mantis

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
bob

Activation logs Mantis

Post by bob »

Hello,

I just have installed Mantis but I 'm looking for Mantis Logs !
Can you help me :) ?
atrol
Site Admin
Posts: 8575
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Activation logs Mantis

Post by atrol »

bob wrote:looking for Mantis Logs !
What exactly do yuo mean with this?
Might help
http://www.mantisbt.org/docs/master-1.2 ... IG.LOGGING
Please use Search before posting and read the Manual
bob

Re: Activation logs Mantis

Post by bob »

In fact, I have a problem on the sending of e-mail and I wanted to see logs mantis (/Var/mantis/log/ mantis.log for example) but I do not find of log on the server !
atrol
Site Admin
Posts: 8575
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Activation logs Mantis

Post by atrol »

Did you add something like the following lines to file config_inc.php?

Code: Select all

$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:/var/mantis/log/mantisbt.log';
Please use Search before posting and read the Manual
bob

Re: Activation logs Mantis

Post by bob »

I have that :

$g_log_level = LOG_EMAIL;

$g_log_destination = 'file:/var/www/mantis/log';

i'll try to create the file mantisbt.log...
atrol
Site Admin
Posts: 8575
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Activation logs Mantis

Post by atrol »

bob wrote: $g_log_destination = 'file:/var/www/mantis/log';
$g_log_destination should be a file name, not a directory name
atrol wrote:

Code: Select all

$g_log_destination = 'file:/var/mantis/log/mantisbt.log';
Please use Search before posting and read the Manual
bob

Re: Activation logs Mantis

Post by bob »

No, it doesn't work with
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:/var/www/mantis/log/mantisbt.log';
bob

Re: Activation logs Mantis

Post by bob »

I created my logfile mantisbt.log but it's always empty !
Others ideas ?
bob

Re: Activation logs Mantis

Post by bob »

Now it works ! After a reboot !!! :p Thanks a lot.
feidakila
Posts: 5
Joined: 02 Apr 2014, 14:56

Re: Activation logs Mantis

Post by feidakila »

Happens the same to me, but even though I restart apache service still not working
atrol
Site Admin
Posts: 8575
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Activation logs Mantis

Post by atrol »

feidakila, what exactly did you configure?
Please use Search before posting and read the Manual
feidakila
Posts: 5
Joined: 02 Apr 2014, 14:56

Re: Activation logs Mantis

Post by feidakila »

These are my values on config_inc.php

Code: Select all

$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT | LOG_DATABASE;
$g_log_destination = 'file:/var/log/apache2/mantisbt.log';
I've tried to locate the log file also inside app folder to ensure that apache user has access to the file, something like:

Code: Select all

touch /var/www/mantis/mantisbt.log
chown www-data:www-data /var/www/mantis/mantisbt.log

$g_log_destination = 'file:/var/www/mantis/mantisbt.log';
I've been debugging the code and found that in core/loggin_api.php -> log_event() never fails on this condition:

Code: Select all

	if ( 0 == ( $t_sys_log & $p_level ) ) {
		return;
	}
so that's why it's not loggin values.

$t_sys_log = 35

$p_level parameter seems to be always 4 that's why the & function never results in 1 value
feidakila
Posts: 5
Joined: 02 Apr 2014, 14:56

Re: Activation logs Mantis

Post by feidakila »

Anyway I've found a permission denied on the file, stopping an http redirection.

Solved, was a file permissions issue

create the log file, set owner and permissions in bash

Code: Select all

touch /var/www/mantis/mantisbt.log
chown www-data:www-data /var/www/mantis/mantisbt.log
chomod 775 /var/www/mantis/mantisbt.log
in my config_inc.php

Code: Select all

$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT | LOG_DATABASE;
$g_log_destination = 'file:/var/www/fega_mantis_pre/mantisbt.log';
Post Reply