-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[stable26] emit an event when a message is logged #38815
Conversation
This is a backport of a new API. Is this really necessary or could there be a workaround? |
It's for nextcloud/logreader#873 so I would say this should not be backported. |
right, and since annotations also would need to be adjusted if we have a reason to backport, missed them. |
/** | ||
* Even for when a log item is being logged | ||
* | ||
* @since 28.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change @SInCE annotations to specific 26.0.x target version.
moving to 26.0.4 then |
c802e50
to
decbd93
Compare
updated the sinces, included #38843 reasoning behind the backport is making nextcloud/logreader#873 available for debugging earlier as it could be very usefull during support |
needs another reviewer |
moving to 26.0.5 |
Wait, why is this updating 3rdparty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doubts about 3rdparty bump
@icewind1991 accidental? |
moving to 26.0.6 |
moving to 26.0.7 |
decbd93
to
fde250f
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
fde250f
to
c1452aa
Compare
fixed the accidental 3rdparty change |
|
||
// inject the event dispatcher into the logger | ||
// this is done here because there is a cyclic dependency between the event dispatcher and logger | ||
if ($this->logger instanceof Log or $this->logger instanceof Log\PsrLoggerAdapter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($this->logger instanceof Log or $this->logger instanceof Log\PsrLoggerAdapter) { | |
if ($this->logger instanceof Log || $this->logger instanceof Log\PsrLoggerAdapter) { |
This is a backport so it should be left as-is, but we usually use ||
/&&
and not or
/and
@blizzz can you re-review? |
private $message; | ||
|
||
/** | ||
* @since 28.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all @since
annotations should reflect the target version of the backport
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* @return string | ||
* @since 26.0.8 | ||
*/ | ||
public function getMessage(): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#38843 was not backported, wrong type.
Backport of #38490