Announcement

Collapse
No announcement yet.

Log Config.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log Config.php

    Hi,

    I'm changed the config file to display all errors in the log file but nothing hapens.

    Here is my config file

    ],
    'language' => 'pt_BR',
    'logger' => [
    'path' => 'data/logs/crm.log',
    'level' => 'ALL',
    'rotation' => false,
    'maxFileNumber' => 30


    Any hint?

  • #2
    We're a group of established PHP projects whose goal is to talk about commonalities between our projects and find ways we can work better together.

    Comment


    • #3
      already changed to DEBUG and nothing happens

      Comment


      • #4
        ziondevil, did you ever figure this out? I'm looking for a way to write log statements to the log and nothing I've tried has worked. I see a LoggerTrait in the vendor directory, but it doesn't seem to always work. It's really frustrating to not be able to log any output.

        Edit: I found a statement that works most of the time.

        $GLOBALS['log']->error();



        error takes three arguments and it dumps them to the log. Here's an example:

        $GLOBALS['log']->error('Job CheckInboundEmails '.$entity->id.': [' . $e->getCode() . '] ' .$e->getMessage());



        Most of the magic happens in here:

        application/Espo/Core/Utils/Api/Slim.php
        Last edited by bandtank; 03-06-2017, 04:52 AM.

        Comment


        • #5
          I'm having the same issue. Setting to 'DEBUG' does not work. I also found the $GLOBALS['log']->error() function as a backup but that's not practical to be sprinkling around. Has anyone figured out how to get DEBUG logging to work?

          Comment


          • #6
            Hi,
            I use DEBUG mode
            Code:
                'logger' => [
                    'path' => 'data/logs/espo.log',
                    'level' => 'DEBUG',
                    'rotation' => true,
                    'maxFileNumber' => 30
                ],
            Today's log records after rebuild
            Code:
            [2018-03-20 08:34:08] Espo.DEBUG: Schema\Converter - Start: building schema [] []
            [2018-03-20 08:34:08] Espo.DEBUG: DBAL: Table [entity_team] exists. [] []
            [2018-03-20 08:34:08] Espo.DEBUG: Schema\Converter - End: building schema [] []
            It works. Run rebuild and check the log file

            Comment

            Working...
            X