What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, Do you know how can I log exception to the error log in spryker (without breaking execution o

USZB5JN4W
USZB5JN4W Posts: 112 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello,
Do you know how can I log exception to the error log in spryker (without breaking execution of the website)?

Comments

  • USLUHK9SQ
    USLUHK9SQ Posts: 92 πŸ§‘πŸ»β€πŸš€ - Cadet

    try catch ?, i do that like that in other project and working

  • USZB5JN4W
    USZB5JN4W Posts: 112 πŸ§‘πŸ»β€πŸš€ - Cadet

    i mean how to get access to any built in logging implementation (monolog or any other)

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    try \Spryker\Shared\Log\LoggerTrait

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    or, even better, \Spryker\Shared\ErrorHandler\ErrorLogger

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet
    ErrorLogger::getInstance()->log($exception);
    
  • USZB5JN4W
    USZB5JN4W Posts: 112 πŸ§‘πŸ»β€πŸš€ - Cadet

    thank you πŸ™‚