My question is about logging packages, not about debugging packages, although logging packages are often used as part of debugging.
Messages that are written to a log are defined in the code, so there's no way to avoid them becoming part of the codebase. Maybe it's possible to avoid making it a package dependency (part of my question), but only if you don't mind users being unable to activate logging when reporting an issue.
For reference, the debugme README says, "To use debugme in your package, import it, and then add the following .onLoad function to your package", so I think it is intended to be a dependency.