Account created on 2 August 2023, over 1 year ago
#

Merge Requests

Recent comments

πŸ‡ΈπŸ‡ͺSweden devdits

Hi everyone,

Will it have sense to use general `log` method instead of calling method from variable? Less code + Less magic in the code = Easier to read.

I also think that from logs searching perspective logs should be placed in the old channel and not in a new one. If log comes from a module it should be written into the modules channel and not into a new one.

      // A severity of -1 is not a valid RfcLogLevel but is the default value. With -1,
      // Ultimate Cron logs a message saying that cron has been executed, which is
      // unnecessary if you're running cron every minute as recommended.
      if ($log_entry->severity > -1) {
        $log_message = strip_tags($log_entry->message ?: $log_entry->formatInitMessage());
        $this
          ->loggerFactory
          ->get($log_entry->name)
          ->log($log_entry->severity, $log_message);
      }

I have added strip_tags in my example to convert such error messages:

LogicException: Tratata in super_duper_cron() (line 44 of

To this:

LogicException: Tratata in super_duper_cron() (line 44 of /var/www/html/web/modules/custom/my_module/my_module.module).

πŸ‡ΈπŸ‡ͺSweden devdits

Rebased MR on latest 8.x-3.x.
Could not update MR, so will add patch here.

πŸ‡ΈπŸ‡ͺSweden devdits

This patch can solve the problem until someone will create better solution.

πŸ‡ΈπŸ‡ͺSweden devdits

devdits β†’ made their first commit to this issue’s fork.

Production build 0.71.5 2024