log4net with asp.net mvc - can't watch file for changes -
so in console .net application can watch log4net events stream (the powershell command) get-content .\log.log -wait
similar linux tail
command , assume uses filesystemwatcher under hood.
for reason, whenever have asp.net mvc application not work. clear, log file written to. can get-content .\log.log
many times want , recent results, -wait
parameter never see changes scroll past.
does have insight might going on here?
update: found working solution case, not sure whether out.
instead of using powershell, downloaded win-bash , i'm using familiar unix command works me.
tail -f access.log
i'm not familiar .net programming. working solution in case use win-bash project's bash.exe instead of powershell?
i experiencing similar issue when trying "tail" apache access log in powershell.
get-content .\access.log -wait
i noticed when apache http server running, has handle open acccess.log , -wait doesn't work. stopping http server releases handle , when made manual changes access.log using text editor powershell window reflected changes in console.
so assume if other program has handle open file, changes not reflected console. unfortunately haven't found way around issue far.
Comments
Post a Comment