serilog-settings-appsettings icon indicating copy to clipboard operation
serilog-settings-appsettings copied to clipboard

Relative path support for bufferBaseFilename property when set on config?

Open jafin opened this issue 6 years ago • 2 comments

May I check if the this package (for use with bufferBaseFilename eg) supports relative paths? When configured in the app.config such as:

<add key="serilog:write-to:Seq.bufferBaseFilename" value="~/app_data/seq_buffer" />

Seq writes on this system to \windows\system32\inetsrv~\app_data Ideally it would of written to the relative path of the web app.

jafin avatar Nov 20 '18 23:11 jafin

Hi @jafin - since environment variables can be substituted into values, there's a technique detailed in https://github.com/serilog/serilog/issues/454#issuecomment-113091429 for doing this. HTH!~

nblumhardt avatar Nov 21 '18 03:11 nblumhardt

I think that the APPL_PHYSICAL_PATH environment variable would emulate ~ adequately in this case.

taspeotis avatar Nov 21 '18 09:11 taspeotis