20140227 (Thursday, 27 February 2014)

Uff, the explanation for docs/tickets/99 was complex:

First I had to learn that this was a case of logging before lino.utils.log.configure() was run. That’s why my first series of Plugin instantiations was never shown.

Lesson: When you want to log things that happen before Django calls lino.utils.log.configure(), then of course you must configure logging manually.

Second I had forgotten that override_defaults is also called from djangosite.utils.djangotest. This caused the second instantiation.

It is also possible that Lino did not correctly detect whether logging is already configured.

I removed the apps = settings.site.plugins from lino.dd and later realized this this was not necessary. Maybe I will restore it one day.

One day I should really get used to use the debugger in such cases instead of adding print statements and logger.info calls every here and there.

One useless feature less

In 2013-10-14 I added a new feature: “Lino now supports insert_layout with only one element: it uses then a hard-coded height of 10 lines.”

Joe reported a problem caused by this feature and suggested to simply remove it “because it generates some surprising results. I think layout with only one item should by default use “auto” size.”

He is absolutely right, this was a silly feature.