[Koha-bugs] [Bug 8190] Add a logging module to Koha

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 12 14:19:44 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8190

M. de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18870|0                           |1
        is obsolete|                            |

--- Comment #95 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 18880
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18880&action=edit
Bug 8190: Koha::Utils::Logger, Logging module

Use the logger like:
$logger= C4::Context->logger;
$logger->debug("This is a debug message");
$logger->info("This is an information");
$logger->error("This is an error !");

The Logger constructor can take an hash reference with "file" and
"level" to define a filepath or a log level.

For a log level >= warning, a call stack is printed.

Prerequisite:
- set an environment variable KOHA_LOG in your virtual host:
    SetEnv KOHA_LOG /home/koha/var/log/opac.log
- set a write flag for www-data on this file

Please have a look at t/Logger.t for more details.

Includes (apparently from squashed patches):
Bug 8190: Followup Logger: FIX perlcritic
Bug 8190 - Followup - Add cached logger, output messages to template
* Add C4::Context->logger
* Embed logged messages to a comment in the template html,
  controlled by the system preference LogToHtmlComments\
* Add both new system preferences to sysprefs.sql
Bug 8190 follow-up moving updatedatabase part at the right place

Signed-off-by: Mason James <mtj at kohaaloha.com>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain at biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Amended the patch for a updatedatabase problem. Edited the commit message.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list