sentinel
sentinel copied to clipboard
Load existing file?
Hello,
i create a new logger and select a file. I only want to view an existing file. Provider is the "File Monitoring Provider". Then I select the file and check the box "Load existing content from file". Decoder Format "nLog default...:". Then the application starts, but there are no entries from file. Everything is empty. What am I doing wrong?
Best Regards, Alex
From my experience it works when the default layout is used in your NLog.config. Can you post your NLog.config entry that creates the file you are targeting?
Mine has a layout that looks like this:
layout="${longdate}|${level:uppercase=true}|${logger}|${message}"
Notice that the field separator is a pipe |
Hello, I am upping this old question because I have just discovered Sentinel, and I met exactly the same issue.
I guess it happens because my layout is not the standard one above. It mainly consists of: ${date:format=yyyy-MM-dd HH:mm:ss} ${pad:padding=5:inner=${uppercase:${level}}} ${callsite:IncludeSourcePath=false} followed by the message and other stuff.
Please, is there a way to set the layout in Sentinel to make it able to parse non standard files ?
Thank you
@AFract This project hasn't seen an update in 4 years. I believe your options are to modify your layout to match what sentinel accepts or create a fork and PR that adds the layout configuration you desire. Option one being the easiest.
Hello @A9G-Data-Droid I have noticed that. But as there's no documentation regarding this and there is already many forks I thought it could be interesting to ask the question, just in case I missed something somewhere. If modifying the layout was actually an easy option, I would have already done it. Thank you anyway.