It sounds like the ASMX service has a different root
, and probably desirable.
You could parse the mappath to give the /logs directoy but, unless there is a specific requirement to log to there, IMO it is better to keep the logs seperate.
One further suggestion, you could look at Log4Net
] it's free, open source and pretty robust to failure (the last point is difficult to achieve in a logger!). The one draw-back is that it isn't guarenteed that the log will be written to (i.e. if an exception is thrown while logging, the log entry might not be written - part of its fail-over nature). That said, I've used it lots and had very few problems. One further thing is that it allows you to log to different stores, such as SQL or Text ( or a combination, or a custom store!) it also auto-rolls up logs if you want, and you can define a retention policy. It can be a little difficult to configure, but there are lots of resources out there. I'm not connected to the log4net project BTW, I just think it is fantastic :-).