http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8190
Katrin Fischer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #48 from Katrin Fischer <[email protected]> --- I can't get debug to show up. My LogLevel is set to the highest level 7. I verified this is also the value in the systempreferences table. I added following code to the mainpage.pl file: use Koha::Utils::Logger qw/$log/; $log = Koha::Utils::Logger->new; $log->unusable("This is an unusable thing"); $log->critical("This is critical!"); $log->error("This is an error !"); $log->warning("This is only a warning."); $log->normal("This nothing to worry about."); $log->info("This is an information"); $log->debug("This is a debug message"); With LogToHtmlComments set to Embed I can see following in the HTML source code of the main page: <!-- LOG MESSAGES [Thu Dec 27 17:54:44 2012] UNUS : This is an unusable thing [Thu Dec 27 17:54:44 2012] CRIT : This is critical! [Thu Dec 27 17:54:44 2012] ERROR : This is an error ! [Thu Dec 27 17:54:44 2012] WARN : This is only a warning. [Thu Dec 27 17:54:44 2012] NORMAL: This nothing to worry about. [Thu Dec 27 17:54:44 2012] INFO : This is an information --> My log files shows: [27/12/2012 17:54:44] UNUS : This is an unusable thing [27/12/2012 17:54:44] CRIT : This is critical! [27/12/2012 17:54:44] ERROR : This is an error ! [27/12/2012 17:54:44] WARN : This is only a warning. [27/12/2012 17:54:44] NORMAL: This nothing to worry about. [27/12/2012 17:54:44] INFO : This is an information My test plan so far was: 1) Apply patches and try to access Koha. Verify useful error message is shown. 2) Install new dependency: Log::LogLite sudo apt-get install liblog-loglite-perl 3) Run database update Verify database update works correctly 4) Run t/Logger.t Verify all tests pass 5) Do some searches in OPAC. Verify Koha does not explode and all is acting normal. Verify debug message is not showing up in HTML source. Look for <!-- LOG MESSAGES Verify nothing has changed and no messages show up. 6) Set environment variables in your Apache configuration files I added following line to the OPAC and Intranet <virtualhost> sections: SetEnv KOHA_LOG "/home/<user>/koha-dev/var/log/opac.log" SetEnv KOHA_LOG "/home/<user>/koha-dev/var/log/intranet.log" Make sure log file is writeable for your Apache user. 7) Repeat 5). Check that the searches show up in the OPAC log file. 8) Change one of the intranet files and add some messages/warns etc. to be logged. 9) Set LogToHtmlComments to 'Embed' and check output in log file and for the debug messages in the source code. Looks for <!-- LOG MESSAGES ALSO: With bug 7167 pushed, the update database part on this should be rewritten. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
