-
Notifications
You must be signed in to change notification settings - Fork 99
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
custom fields in CLS #1424
Comments
Hi @qby-ankul, So the section you've linked contains information for both services. If I understand correctly, you experience that the docs for ALS are correct (even if they're thin) but for CLS the docs are incorrect and don't enable you to make it work. Right? Could you give an example configuration that doesn't work? Is there an error message or sth alike that you can share? |
Hi @renejeglinsky, Yes, that's right. We used the following code in ALS: Which no longer works in CLS. In general, I would like the documentation to be more meaningful than how do I configure this. But also, how can I use it. |
Thanks @qby-ankul. So you're trying to use the same custom field in both, ALS and CLS, correct? I'm not sure if this is possible. @sjvans Could you give some insights here? |
Hi @renejeglinsky, no, we switched from ALS to CLS. So far we have lived with it being displayed in msg. However, this is not a permanent solution. We would like it to be listed as a separate field as mentioned in the documentation or in ALS. |
hi @qby-ankul could you please elaborate on "this does not work in CLS"? for me, it works no problem: "cds": {
"log": {
"als_custom_fields": {
"bla": 0
},
"cls_custom_fields": [
"bla"
]
}
} const cds = require('@sap/cds')
const LOG = cds.log('foo')
module.exports = srv => {
srv.on('bar', req => {
LOG.info('baz', { bla: 'blub' })
})
} best, |
Hi @sjvans unfortunately does not work for me: https://github.com/qby-ankul/cls-custom-fields-demo/blob/main/cls-log.json I have created an example: https://github.com/qby-ankul/cls-custom-fields-demo/tree/main The CLS is set up according to the documentation: Bind the Application to a User Provided Service bonus bug, the generated readiness parameters doesn't work ... |
hi @qby-ankul the binding via user-provided service is the issue. we assume a "normal" binding that identifies the service. otherwise we can not reliably protect against false positives... but i'll see what we can do. can confirm the broken readiness checks, but i'll need to reach out to the respective colleagues. as far as i can tell, we generate an mta that is compliant to the readiness-health-check-http-endpoint docs. best, |
Hi all,
I am trying to define my own fields in CLS. For the ALS it works as described, even if the documentation here is a bit thin. How do I have to pass the parameters to the logger? In ALS I pass them as an object, this does not work in CLS.
docs/node.js/cds-log.md
Line 406 in 894f95d
The text was updated successfully, but these errors were encountered: