New answers tagged uls
Run the code using SPSecurity.RunWithElevatedPrivileges(). This way code will get executed using App pool account. If the app pool account is part of the group Performance Log Users, the code will be able to write in the ULS logs.
Top 50 recent answers are included