I there a way to query SQL Server 2005+ for the file system location of its various log files. By that I mean the text log files, not database transaction log files?
For example my SQL Agent, Error Logs and maintenance plans all write to a folder called:
It's this folder I need to find the name of.
As well as hunting SQL Books I had a poke around the registry under
but nothing jumps out at me.
I'd also like an "official" way to achieve this and would rather not rely on undocumented features.