Pierre Goiffon 0e14be8b15 N°4261 Refactor ExceptionLog (#239)
Doing a code review with Bruno, we agreed to do some little refactoring :

* Level per exception class
  - Before the whole ExceptionLog::Log method was a total rewrite of its parent, with some code duplicates... not a good idea : we should better improve LogAPI to make other similar uses possible in the future !
  - The logic to get level from config must be in a GetMinLogLevel override
* Write to DB
  - Pull up this functionnality in LogAPI
  - Add a sCode parameter in GetLevelDefault

Doing this refactoring, I also improved :

* Test the attributes set when creating the EventIssue object : during my dev I had crashes because I didn't filled all the mandatory fields... Having a PHPUnit test checking this will prevent future bugs to happen if attributes are modified in the class or in the object creation method
* Use Throwable instead of Exception : this was added in PHP 7.0 and will allow to catch both Exception and Error
* Because we need to have 2 statements on the same line in \Combodo\iTop\Test\UnitTest\Core\Log\ExceptionLogTest::testLogInFile, I modified the editorConfig file to allow disabling the formatter using comments.
2021-10-20 16:01:08 +02:00
2021-10-20 16:01:08 +02:00
2021-10-20 09:52:32 +02:00
2020-05-14 11:26:35 +02:00
2021-03-15 09:29:45 +01:00
2021-10-20 16:01:08 +02:00
2019-11-14 15:43:29 +01:00
2019-11-22 18:44:27 +01:00
2021-08-18 14:35:35 +02:00
2021-03-29 10:30:54 +02:00
2020-06-23 15:10:09 +02:00
2020-08-18 09:18:37 +02:00

iTop - ITSM & CMDB

iTop stands for IT Operations Portal. It is a complete open source, ITIL, web based service management tool including a fully customizable CMDB, a helpdesk system and a document management tool. iTop also offers mass import tools and web services to integrate with your IT

Features

Latest release

Resources

About Us

iTop development is sponsored, led and supported by Combodo.

Contributors

We would like to give a special thank you 🤗 to the people from the community who contributed to this project, including:

Names

  • Alves, David
  • Beck, Pedro
  • Bilger, Jean-François
  • Bostoen, Jeffrey (a.k.a @jbostoen)
  • Cardoso, Anderson
  • Cassaro, Bruno
  • Casteleyn, Thomas (a.k.a @Hipska)
  • Castro, Randall Badilla
  • Colantoni, Maria Laura
  • Couronné, Guy
  • Dvořák, Lukáš
  • Goethals, Stefan
  • Gumble, David
  • Kaltefleiter, Lars (a.k.a @larhip)
  • Khamit, Shamil
  • Kincel, Martin
  • Konečný, Kamil
  • Kunin, Vladimir
  • Lassiter, Dennis
  • Lazcano, Federico
  • Lucas, Jonathan
  • Malik, Remie
  • Mindêllo de Andrade, Lucas (a.k.a @rokam)
  • Rosenke, Stephan
  • Seki, Shoji
  • Shilov, Vladimir
  • Tulio, Marco
  • Turrubiates, Miguel

Aliases

  • chifu1234
  • cprobst
  • DudekArtur
  • Karkoff1212
  • Laura
  • Purple Grape
  • Schlobinux
  • theBigOne
  • ulmerspatz

Companies

Languages
PHP 87.5%
JavaScript 5%
SCSS 2.7%
Twig 2.3%
CSS 2.2%
Other 0.2%