[OTRS 3.3.5] System Log level

Moderator: crythias

Post Reply
Wojtek
Znuny newbie
Posts: 26
Joined: 17 Mar 2014, 12:11
Znuny Version: 3.3.8
Real Name: Wojciech
Company: UKE

[OTRS 3.3.5] System Log level

Post by Wojtek »

I don't exactly know, when that happened, but now in System Log there appear very detailed informations, like:

[notice] Run GenericAgent Job 'trigger escalation events' from config file.

In one second there can be a few logs.

Lately I have made some changes to OTRS like:
- activate crone jobs and set short execute time for test purpose,
- upgrade from 3.3.3 to 3.3.5 version (with directions from UPGRADE file),
- update apache config file with file included in 3.3.5 upgrade.

While using version 3.3.3 there was no problem. I got only important logs (probably higher than -> notice level).

What I also noticed, is that logs in the System Log are the same as in messages file located in /var/log.

My question is, how can I regulate logs level showed in OTRS System Log.
I haven't found any option in OTRS SysConfig, that could help me.

Regards,
Wojtek
OTRS 3.3.8
Debian
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: [OTRS 3.3.5] System Log level

Post by reneeb »

You could use http://opar.perl-services.de/dist/MinimumLogLevel-0.0.1 (just edit the .opm and replace 3.0.x with 3.3.x)...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Wojtek
Znuny newbie
Posts: 26
Joined: 17 Mar 2014, 12:11
Znuny Version: 3.3.8
Real Name: Wojciech
Company: UKE

Re: [OTRS 3.3.5] System Log level

Post by Wojtek »

I installed this package and the result is:
when change level to [info], [notice] logs still appear.

When change to [error], then is ok.

My aim is to have logs from [info] level (no [notice]).

How can I achieve that?

Regards,
Wojtek
OTRS 3.3.8
Debian
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: [OTRS 3.3.5] System Log level

Post by reneeb »

Works as designed. OTRS defines four log levels: debug, info, notice and error. See https://github.com/OTRS/otrs/blob/rel-3 ... og.pm#L110

So if you enable "debug" all four levels are logged. If you enable "info" only "debug" messages aren't printed and so on...

If you need to change priority order, you could use https://github.com/reneeb/otrs-MinimumL ... tem/Log.pm as the base and change the priorities: https://github.com/reneeb/otrs-MinimumL ... Log.pm#L59
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Wojtek
Znuny newbie
Posts: 26
Joined: 17 Mar 2014, 12:11
Znuny Version: 3.3.8
Real Name: Wojciech
Company: UKE

Re: [OTRS 3.3.5] System Log level

Post by Wojtek »

Follow Your direction I changed swap priority of [info] and [notice] and now looks fine.

By the way, isn't it the right order of log level priority ([notice] less important than [info])?

Thank You for help.

Regards,
Wojtek
OTRS 3.3.8
Debian
Wojtek
Znuny newbie
Posts: 26
Joined: 17 Mar 2014, 12:11
Znuny Version: 3.3.8
Real Name: Wojciech
Company: UKE

Re: [OTRS 3.3.5] System Log level

Post by Wojtek »

After edit Log.pm in Package Manager I got message:

MinimumLogLevel 0.0.1 - Package not correctly deployed! Please reinstall the package. .

Status of Kernel/System/Log.pm file is not valid.

How to manage with that?

Regards,
Wojtek
OTRS 3.3.8
Debian
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: [OTRS 3.3.5] System Log level

Post by reneeb »

Ignore it... it just says that one (or more files) are changed since the installation.
Last edited by reneeb on 18 Mar 2014, 14:06, edited 1 time in total.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: [OTRS 3.3.5] System Log level

Post by reneeb »

Wojtek wrote:By the way, isn't it the right order of log level priority ([notice] less important than [info])?
No, I don't think so (but English is not my native tongue). In my opinion info is "bla bla bla" and notice is "but note" and a "but ..." is more important than just bla.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Wojtek
Znuny newbie
Posts: 26
Joined: 17 Mar 2014, 12:11
Znuny Version: 3.3.8
Real Name: Wojciech
Company: UKE

Re: [OTRS 3.3.5] System Log level

Post by Wojtek »

But when You check OTRS logs, then notice, that there is a lot of [notice] logs and only a few of [info] :)
OTRS 3.3.8
Debian
Post Reply