Weblog does not work

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
joost d
Normal user
Posts: 53
Joined: 24 Dec 2020, 17:55
Location: Netherlands/ Haarlem

Weblog does not work

#1 Post by joost d » 17 Mar 2022, 19:21

using: ESPEasy_ESP32_mega-20211224. Self compiled with Atom.
Hardware: ESP32
Issue: Weblog did not show any information. See example!
In Tools/Advanced/Log settings/ Weblog level: Debug. See example.
Interesting is: Tools/Info/System Status/Web Log Level: "None".... (See example)
Attachments
Tools/Info/System Status/Web Log Level
Tools/Info/System Status/Web Log Level
Info.JPG (81.21 KiB) Viewed 7042 times
Tools/Advanced/Log settings/ Weblog level
Tools/Advanced/Log settings/ Weblog level
Setting.JPG (27.22 KiB) Viewed 7044 times
Weblog
Weblog
Log.JPG (28.44 KiB) Viewed 7044 times

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Weblog does not work

#2 Post by Ath » 17 Mar 2022, 20:03

If you don't have any active tasks, no log will be shown in the weblog output. The status None in the Info page reflects that. Once you activate a task, the log will show up, and the weblog level will be shown in the Info page.
/Ton (PayPal.me)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Weblog does not work

#3 Post by ThomasB » 17 Mar 2022, 20:19

Code: Select all

The status None in the Info page reflects that.
Sorry for my intrusion, but I think that having the Status field show "none" instead of the Web Log Level's actual setting seems like a invitation to confusion; I've been a long time user of ESPEasy and I would have been confused by this too.

What I mean is that the other two status messages (syslog log level and serial log level) appear to be reporting their user settings, not the current message's log level. So it seems to me that web log level should stick with that trend and do the same. I think consistent behavior would prevent confusion. Or so I think.

- Thomas

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Weblog does not work

#4 Post by Ath » 17 Mar 2022, 20:44

ThomasB wrote: 17 Mar 2022, 20:19 What I mean is that the other two status messages (syslog log level and serial log level) appear to be reporting their user settings, not the current message's log level. So it seems to me that web log level should stick with that trend and do the same. I think consistent behavior would prevent confusion.
I agree with your view, (and your opinion is very much appreciated), I have only tried to explain how it seems to work and why there was no log shown :lol:
There must be a reason why this works as it does, I just don't know that reason.
/Ton (PayPal.me)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Weblog does not work

#5 Post by ThomasB » 17 Mar 2022, 20:57

Code: Select all

I agree with your view, (and your opinion is very much appreciated), I have only tried to explain how it seems to work and why there was no log shown
I never intended to shoot the messenger. But re-reading what I wrote sounds like you ended up taking a bullet. Consider it friendly fire. :)
There must be a reason why this works as it does, I just don't know that reason.
There's often a good reason for such things. Maybe someone will come along and tell the story about how it came to be.

- Thomas

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Weblog does not work

#6 Post by Ath » 17 Mar 2022, 21:16

ThomasB wrote: 17 Mar 2022, 20:57 I never intended to shoot the messenger.
No incidents or offense here, that's why I added the :lol:
ThomasB wrote: 17 Mar 2022, 20:57 There's often a good reason for such things. Maybe someone will come along and tell the story about how it came to be.
He's expected to be back soon-ish ;)
/Ton (PayPal.me)

joost d
Normal user
Posts: 53
Joined: 24 Dec 2020, 17:55
Location: Netherlands/ Haarlem

Re: Weblog does not work

#7 Post by joost d » 18 Mar 2022, 08:12

Ath wrote: 17 Mar 2022, 20:03 If you don't have any active tasks, no log will be shown in the weblog output. The status None in the Info page reflects that. Once you activate a task, the log will show up, and the weblog level will be shown in the Info page.
There are many active tasks. If I connect with "Putty" via the USB to the ESP32, I see a lot of messages. It remains a mystery to me why I don't see those messages in the weblog...

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Weblog does not work

#8 Post by Ath » 18 Mar 2022, 10:42

Hm, it also isn't showing the current loglevel, when looking at the screenshot. Maybe the javascript hasn't loaded correctly, you could try a hard refresh of the weblog page in your browser (usually ctrl-F5 key), that should re-fetch that from the cdn (content delivery network) server.
/Ton (PayPal.me)

joost d
Normal user
Posts: 53
Joined: 24 Dec 2020, 17:55
Location: Netherlands/ Haarlem

Re: Weblog does not work

#9 Post by joost d » 18 Mar 2022, 14:36

I have found the cause. It took me half a day.
The plugin p208 puts a "\" in the log. At that point, the blog no longer works. I replaced the "\" with and ";" and now the blog is working again.

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Weblog does not work

#10 Post by Ath » 18 Mar 2022, 15:00

Hmm, great you found it, but a bit weird that a backslash could cause this. Is there another character after that backslash, other than a new-line? Then that could be the real cause, that the javascript or log output is trying to interpret an unknown escape-sequence, or smth like that, and fails/crashes.

NB: I have planned to include that Nokia 5110 display in the main repo, also applying the AdafruitGFX_helper module, developed using P116, P095, P096 TFT and ePaper displays and P131 NeoPixel-Matrix display (to be PR'ed). In that case it will get a different plugin ID, so shouldn't collide with P208.
/Ton (PayPal.me)

joost d
Normal user
Posts: 53
Joined: 24 Dec 2020, 17:55
Location: Netherlands/ Haarlem

Re: Weblog does not work

#11 Post by joost d » 18 Mar 2022, 15:12

Well, i have just made a pullrequest for the change in P208. There You can see the change.

If you include that Nokia 5110 display in the main repo, please put the documentation, I wrote in the plugin, in the "https://www.letscontrolit.com/wiki/index.php/Plugin208"

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Weblog does not work

#12 Post by Ath » 18 Mar 2022, 20:51

The Wiki hasn't been structurally updated for over 3 years, current documentation is on readthedocs, for 2 reasons: a) the documentation can be part of the repository, and b) is deployed on merge by the Github Actions (only from the main ESPEasy repository).
The main page of the documentation is here: https://espeasy.readthedocs.io/en/latest/
Not every page of information from the Wiki is transformed to RTD yet, but on update of a plugin at least an attempt is done to move stuff over, or rewrite from scratch.

I've had a quick look at the source of P208, but it will need some surgery before it can be included in the main repository. Major limitation is it doesn't support multiple instance use. But that's fixable. Your documentation improvements will be moved over where appropriate, of course, that part looks quite good.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Weblog does not work

#13 Post by TD-er » 18 Mar 2022, 22:22

About the web log state/level on the sysinfo page....
It reflects the actual level, not the set level and that depends on whether someone actually tries to fetch the web log.
Otherwise the logs take up lots of RAM if nobody is reading them.
Only exception to this is that the web log level is set to the level set in the settings, or else you would never be able to fetch the boot messages via the web log.

And I'm indeed way too long offline now, as things do take frustratingly long to finish.
Right now, it is literally impossible to reach my desk as it is blocked by at least 50 boxes filled with stuff.
And I still need to collect stuff from the temporary house before Wednesday.

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests