I want to log and troubleshoot issues with KWIN and plasmashell related to shutdown or reboot or logoff. Does the KWIN and Plasma shell write to any log for the same?
Yes.
And use journalctrl, after boot for instance:
journalctl --user -S today --reverse
Yes QT_LOGGING_RULES environment variables to improve verbosity.
You can use kdebugsettings app to set it up simply.
And you can have a look at KWin/Debugging - KDE Community Wiki
2 Likes