Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace Spryker\Glue\Log\Plugin\Handler;

use Monolog\Handler\HandlerInterface;

/**
* @method \Spryker\Glue\Log\LogFactory getFactory()
*/
class NonBufferedStreamHandlerPlugin extends AbstractHandlerPlugin
{
/**
* @return \Monolog\Handler\HandlerInterface
*/
protected function getHandler(): HandlerInterface
{
if (!$this->handler) {
$this->handler = $this->getFactory()->createStreamHandler();
}

return $this->handler;
}
}
2 changes: 1 addition & 1 deletion src/Spryker/Yves/Log/LogFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function createBufferedStreamHandler()
/**
* @return \Monolog\Handler\HandlerInterface|\Monolog\Handler\StreamHandler
*/
protected function createStreamHandler()
public function createStreamHandler()
{
$streamHandler = new StreamHandler(
$this->getConfig()->getLogDestinationPath(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace Spryker\Yves\Log\Plugin\Handler;

use Monolog\Handler\HandlerInterface;

/**
* @method \Spryker\Yves\Log\LogFactory getFactory()
*/
class NonBufferedStreamHandlerPlugin extends AbstractHandlerPlugin
{
/**
* @return \Monolog\Handler\HandlerInterface
*/
protected function getHandler(): HandlerInterface
{
if (!$this->handler) {
$this->handler = $this->getFactory()->createStreamHandler();
}

return $this->handler;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function createBufferedStreamHandler()
/**
* @return \Monolog\Handler\HandlerInterface|\Monolog\Handler\StreamHandler
*/
protected function createStreamHandler()
public function createStreamHandler()
{
$streamHandler = new StreamHandler(
$this->getConfig()->getLogDestinationPath(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace Spryker\Zed\Log\Communication\Plugin\Handler;

use Monolog\Handler\HandlerInterface;

/**
* @method \Spryker\Zed\Log\Communication\LogCommunicationFactory getFactory()
* @method \Spryker\Zed\Log\Business\LogFacadeInterface getFacade()
* @method \Spryker\Zed\Log\LogConfig getConfig()
*/
class NonBufferedStreamHandlerPlugin extends AbstractHandlerPlugin
{
/**
* @return \Monolog\Handler\HandlerInterface
*/
protected function getHandler(): HandlerInterface
{
if (!$this->handler) {
$this->handler = $this->getFactory()->createStreamHandler();
}

return $this->handler;
}
}
Loading