[IMPLEMENTED] Missing message property in log

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report (perhaps?)
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

I set up seq (simple logging ui) and it seems like Squidex do not include message in most of the log message (https://github.com/datalust/sqelf/issues/95)

Expected behavior

Always include message (?)

Environment

  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: 6.5.0.0

Yes, it is true. Mosts logs are more json structure than logs. We can change this, but it is requires a PR and is not a bug.

1 Like

I wanted to have a look into this since a while. I am going to fix it until tomorrow. Because the error messages are partially to cryptical.

Has been implemented. If you have concrete log entries without messages please let me know or provide a PR :wink:

Is that publish as last docker image dev-6688?

It still seems like most of the requests (if not all) use “short_message” instead of “message” (what if I understated from someone in seq team is some sort of standart).

Here is example log message from seq when I enable diagnostic mode (then it should have property with raw message at least I hope).

{"version":"1.1","host":"docker-desktop","short_message":"{\"logLevel\":\"Information\",\"message\":\"HTTP request executed.\",\"elapsedRequestMs\":2,\"filters\":{\"userId\":\"6204d1f0ce472649b59b50a6\",\"clientId\":\"squidex-frontend\",\"costs\":0},\"timestamp\":\"2022-02-10T09:12:48Z\",\"app\":{\"name\":\"Squidex\",\"version\":\"5.0.0.0\",\"sessionId\":\"0aab4265-831b-45b0-88b3-fc5e40b048c6\"},\"web\":{\"requestId\":\"00-952a447cc15e8616890de74d26456cd3-80157eba7486b5db-01\",\"requestPath\":\"/api/users/6204d1f0ce472649b59b50a6/notifications\",\"requestMethod\":\"GET\"}}","timestamp":1644484368.475,"level":6,"_command":"dotnet Squidex.dll","_container_id":"4fc01aae4ce365fcbf5b0b9db28f7ce9a783fa237b207eb0b67c4f8764e260a1","_container_name":"squidex-dev_squidex_squidex.1.rraoqv1lyfau71vmvj63847ph","_created":"2022-02-10T09:09:00.4032578Z","_image_id":"sha256:db398f429141239d82eda3921db862066811fd099b5cd9aca412e117147f39c0","_image_name":"squidex/squidex:dev-6688@sha256:d453ffd539fc185772dae61fde2abc434fc3dab5075a1ff13e1266d1e6609ea1","_tag":"4fc01aae4ce3"}

Comment from “seq repo issue” https://github.com/datalust/sqelf/issues/95#issuecomment-1034551303

It seems that the “message” property is not standard as I wrote (sorry I am not an expert in this area).

Unfortunately we don’t have any way in Seq to define an alternative message property, but we do have a bit of logic in this GELF server already that tries to find and set properties on nested JSON objects based on some common conventions. I think it would be reasonable for us to look for a property called message or msg and use it as Seq’s @m property if one isn’t set already. I’ll put a PR together :+1:

Yes, 6688 should work. What is the problem? There is a message now. “HTTP request executed”

Short_message is not from me, it is from your docker engine I think. Everything within “short_message” is from Squidex but is wrapped in another json object.

Oh, sorry I missed the message in raw json. Then now it should be seq problem, I guess. From there github it seems like standart for logging is actually use @m by default i do not know what is the standard (if there is any). But the current state should be ok (for me after seq implement support for message).

Thanks for implementing this feature.

I use mainly Google Cloud and message works fine there, it is the standard I would say.