PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
woocommerce-pos / vendor_prefixed / sentry / sentry / src / Logs / Log.php

Log.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.18, at vendor_prefixed/sentry/sentry/src/Logs/Log.php

90 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare (strict_types=1);
4 namespace WCPOS\Vendor\Sentry\Logs;
5
6 use WCPOS\Vendor\Sentry\Attributes\AttributeBag;
7 class Log
8 {
9 /**
10 * @var float
11 */
12 private $timestamp;
13 /**
14 * @var string
15 */
16 private $traceId;
17 /**
18 * @var LogLevel
19 */
20 private $level;
21 /**
22 * @var string
23 */
24 private $body;
25 /**
26 * @var AttributeBag
27 */
28 private $attributes;
29 public function __construct(float $timestamp, string $traceId, LogLevel $level, string $body)
30 {
31 $this->timestamp = $timestamp;
32 $this->traceId = $traceId;
33 $this->level = $level;
34 $this->body = $body;
35 $this->attributes = new AttributeBag();
36 }
37 public function getTimestamp() : float
38 {
39 return $this->timestamp;
40 }
41 public function setTimestamp(float $timestamp) : self
42 {
43 $this->timestamp = $timestamp;
44 return $this;
45 }
46 public function getTraceId() : string
47 {
48 return $this->traceId;
49 }
50 public function setTraceId(string $traceId) : self
51 {
52 $this->traceId = $traceId;
53 return $this;
54 }
55 public function getLevel() : LogLevel
56 {
57 return $this->level;
58 }
59 public function setLevel(LogLevel $level) : self
60 {
61 $this->level = $level;
62 return $this;
63 }
64 public function getPsrLevel() : string
65 {
66 return $this->level->toPsrLevel();
67 }
68 public function getBody() : string
69 {
70 return $this->body;
71 }
72 public function setBody(string $body) : self
73 {
74 $this->body = $body;
75 return $this;
76 }
77 public function attributes() : AttributeBag
78 {
79 return $this->attributes;
80 }
81 /**
82 * @param mixed $value
83 */
84 public function setAttribute(string $key, $value) : self
85 {
86 $this->attributes->set($key, $value);
87 return $this;
88 }
89 }
90