That logging config is based on Python's logging module, and it also requires some knowledge about the internals of BitBake (which logger is used where). With this config you can change some of the console logs, and create new files with custom format/content, but the log.do_* files' format and content is coded in a non-configurable way (not sure if it's accidental, or intentional to ensure a predictable log-standards in those files). I know that at least it can be configured in a way to have timestamps for the tasks in a separate file (do_compile started, do_compile ended, etc) - but if that would be good enough for you, there is an easier way to get this info.

You could achieve very similar results using the buildstats class[1], if you add 'USER_CLASSES += "buildstats"' to local.conf, and build your image. It will create a build/tmp/buildstats folder for each recipe you build, containing stats about the build process. These are text files, you can just read/grep the elapsed time (and other details). Or: you can visualize this data with a script (see link for the details). That would allow seeing easily which tasks of which recipes are the most time-demanding ones.

[1]: https://docs.yoctoproject.org/ref-manual/classes.html#buildstats

On 31.01.25 15:31, Markus H via lists.yoctoproject.org wrote:
Hi,

I'm currently debugging a few yocto recipes, especially regarding long
build times. In order to get further insights, I simply would like to
have timestamps in all my log entries, so I can easily spot which
command took how long.

Is there an easy way to achieve this globally?

I found this here:
https://docs.yoctoproject.org/bitbake/2.10/bitbake-user-manual/bitbake-user-manual-execution.html#logging

But I'm struggling to understand how this can be used:
* Is this for additional log files only, or can it be used to simply
change all logs? Does the latter make sense in your opinion? What
would a config file for this case look like?
* How does the HashEquiv example log file get linked to the related
messages? I see "BitBake.SigGen.HashEquiv" and
"BitBake.RunQueue.HashEquiv" - where do these identifiers come from,
and how can I set this up to match e.g. all tasks for specific
recipes?
* Is there maybe a better way to debug such issues? I found almost no
code using BB_LOGCONFIG online, so I'm wondering if I'm using the
right approach here.

PS: I'm new to this mailing list, and I hope this is the right place
to ask such questions? If not, please kindly redirect me to a more
suitable place :-)

Best regards & many thanks,
Markus



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64692): https://lists.yoctoproject.org/g/yocto/message/64692
Mute This Topic: https://lists.yoctoproject.org/mt/110916286/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to