sentinel icon indicating copy to clipboard operation
sentinel copied to clipboard

Load existing file?

Open schuppsl opened this issue 4 years ago • 4 comments

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

schuppsl avatar Jul 16 '20 10:07 schuppsl

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 |

A9G-Data-Droid avatar Sep 02 '20 21:09 A9G-Data-Droid

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 avatar May 30 '24 15:05 AFract

@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.

A9G-Data-Droid avatar May 30 '24 19:05 A9G-Data-Droid

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.

AFract avatar Jun 05 '24 05:06 AFract