-
Notifications
You must be signed in to change notification settings - Fork 2
Add two log injection applications with custom listeners #116
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
Conversation
1. Update usage of `sourceModel`, `sinkModel`, and `summaryModel` 2. Update usage of `XmlAttribute`, `XmlFile`
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.
- Upload the new expected file
- The CodeQL versions for unit tests and code scanning do not match. We should probably update qlt.conf.json and the
qlpack.yml
files.
Otherwise revert your changes tosourceModel
and use the 2.15.1 bundle (see CodeQL version fromqlt.conf.json
#119)?
@jeongsoolee09 see PR #119:
|
CodeQL version from `qlt.conf.json`
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.
It's good to go!
@@ -0,0 +1,3 @@ | |||
nodes |
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.
Empty expected file
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.
It's expected to be empty, since we don't yet have a query to update the .expected
files.
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.
I think in this case it's better to remove the file so that the unit test will be skipped
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.
That's better. I'll reopen the PR and remove the two .expected
files.
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.
Instead of reopening the PR (I thought it was possible), I opened a new one that only removes the two files: #121.
@@ -0,0 +1,3 @@ | |||
nodes |
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.
Empty expected file
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.
It's expected to be empty, since we don't yet have a query to update the .expected
files.
What this PR contributes
This PR adds two examples of log injection in happening in a UI5 application:
Example 1: Log entries consumed by a custom log listener
sap.base.Log
, a collection of static logging functions, provides an extension point for a developer to add arbitrary code that handles a log entry as it is created. The developer has to define an object that implements a interface methodsap.base.LogListener.onLogEntry
that is called if a log entry is created.The example provides a custom log listener under
webapp/utils/CustomLogListener.js
whoseonLogEntry
sends the log entry via HTTP.Example 2: Log entries consumed by
sap.ui.vk.Notifications
sap.ui.vk.Notifications
is a control provided in the namespacesap.ui.vk
. The control implementsLog.onLogEntry()
and registers itself toLog
usingLog.addLogListener
internally. Since it is a control provided by SAP themselves, it would be a good idea to include this as a separate example.The example declares a use of
sap.ui.vk.Notifications
in itsview/app.view.xml
which automatically picks up log entries and displays it on screen as a notification entry.Future work
If SAP requests for it, refine the existing log injection query to take into consideration the additional elements living in both examples.