Skip to content

Commit c3e7204

Browse files
committed
feat(trait): [LogWithClassPath] use logger to log uuid
1 parent f707be5 commit c3e7204

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Concerns/LogWithClassPath.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
namespace Onramplab\LaravelLogEnhancement\Concerns;
33

44
use Illuminate\Support\Facades\Log;
5+
use Onramplab\LaravelLogEnhancement\Logger;
56

7+
/**
8+
* @deprecated deprecated since version 0.3.0
9+
*/
610
trait LogWithClassPath {
711
public function debug(string $message, array $context = [])
812
{
@@ -47,11 +51,13 @@ public function emergency(string $message, array $context = [])
4751

4852
protected function log(string $logLevel, string $message, array $context = [])
4953
{
54+
$logger = app()->make(Logger::class);
55+
5056
$className = get_class($this);
5157
$context = array_merge($context, [
5258
'class_path' => $className,
5359
]);
5460

55-
Log::log($logLevel, $message, $context);
61+
$logger->{$logLevel}($message, $context);
5662
}
5763
}

0 commit comments

Comments
 (0)