Page 1 of 1

Serviio.log - Notepad++ syntax highlighting

PostPosted: Thu Sep 19, 2013 12:49 pm
by Illico
In attachment, you will find a UDL file that could be load by Notepad++ editor to support syntax highlighting for Serviio.log file.

- Open Notepad++
- select menu Language -> Define your language...
- click Import... button
- select ServiioLogUDL.xml file
- select ServiioLog on User language list
- close windows
- Open serviio.log file

ServiioLogUDLv1.5.xml
Serviio.log UDL file version 1.5 : add apostrophe, java.io.IOException
(7.24 KiB) Downloaded 1148 times

ServiioLogUDLv1.4.xml
Serviio.log UDL file version 1.4 : add a list of [category] keywords
(6.59 KiB) Downloaded 1047 times

ServiioLogUDLv1.3.xml
Serviio.log UDL file version 1.3
(5.33 KiB) Downloaded 1003 times




_ Advanced user _
You can also edit the %USERPROFILE%\AppData\Roaming\Notepad++\userDefineLang.xml file and insert a new <UserLang>...<UserLang/> section from attachment

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Thu Sep 19, 2013 2:59 pm
by iheartninjas
Wow this is great! I have been wanting something like this for a long time.

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Fri Sep 20, 2013 12:04 am
by DenyAll
Illico, love this (will make log files far easier to read) - didn't know this was available as a feature.

Am having an issue however. After a while everything in my log file is red. I have attached my log to demonstrate.

The issue is shown in line 307 - 309 : the 't triggers a red style which stays until the next 't. Looking at the language file Delimiter Style 2 is the culprit - is there any way to trigger this rule only if the opening and closing delimiter are on the same line?

<edit> Have found one way - using the Comment Line Style with a ' as the opening and closing delimiter - this limits the effect to the same line, but still doesn't cater for a single quote on a line (as in the word "don't"). Can you add spaces to the delimiters (eg " '" without the quotes) </edit>

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Fri Sep 20, 2013 8:08 am
by Illico
DenyAll wrote:Can you add spaces to the delimiters (eg " '" without the quotes) </edit>


I have just find this notepad++ feature at work, and for fun I tried with serviio.log...
I also noticed the problem with the ' character ( &apos; ).
I have not found a solution for the moment and adding spaces does not work. So I removed it.
I updated the xml file on first post.

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Fri Sep 20, 2013 10:27 am
by zip
I assume something similar could be done for SublimeText ;-)

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Fri Sep 20, 2013 1:44 pm
by iheartninjas
zip wrote:I assume something similar could be done for SublimeText ;-)



+1 to this. I use SublimeText when log is too large for Notepad ++

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Sat Sep 21, 2013 9:28 am
by DenyAll
Hi Illico - playing with this, but still haven't found a way to do the apostrophe/single quotes... but did play with another feature you may want to consider:

Folder and Default tab, Folding in code 2 style:
- Set the Open to 'Failed to retrieve online item information' including the single quotes
- Set the close to ... (three dots, no spaces or quotes)

This adds "folding" to the warnings regarding not finding online information. You can then use all Alt-0 to fold all these or Alt-Shift-0 to unfold them. There is a risk that the fold group doesn't end with ... but I didn't come across it in my log. ps. if this doesn't make sense, load my log from previous post and that should demonstrate it (lines 103-113 for example).

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Sat Sep 21, 2013 10:37 am
by Illico
DenyAll wrote:Hi Illico - playing with this, but still haven't found a way to do the apostrophe/single quotes...

Yes, I post on notepad++ forum, and we have to way for UDL version 3 for this feature...

DenyAll wrote:but did play with another feature you may want to consider:

Folder and Default tab, Folding in code 2 style:
- Set the Open to 'Failed to retrieve online item information' including the single quotes
- Set the close to ... (three dots, no spaces or quotes)

This adds "folding" to the warnings regarding not finding online information. You can then use all Alt-0 to fold all these or Alt-Shift-0 to unfold them. There is a risk that the fold group doesn't end with ... but I didn't come across it in my log. ps. if this doesn't make sense, load my log from previous post and that should demonstrate it (lines 103-113 for example).

Seems fine, but sometime manually play with 'Fold' and 'unfold' , lines become misaligned.

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Wed Oct 16, 2013 1:53 pm
by Illico
Illico wrote:
DenyAll wrote:Can you add spaces to the delimiters (eg " '" without the quotes) </edit>

...
I also noticed the problem with the ' character ( &apos; ).
I have not found a solution for the moment and adding spaces does not work. So I removed it.
...

DenyAll,
I found a solution with &apos; character:
You can define Open Delimiter = '
You can define Close Delimiter = '
You can defining n't as Operator1 type. In this way apostrophe in the middle of the word can never trigger Delimiter start.



That could be fine now, if Zip could change the format of the log file, so that all file/media name appears between apostrophe.
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 71 and profile Flash player
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Shrek.2.2004.1080p.HDTV.x264-ESiR-Sample.mkv: FLV
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Shrek.2.2004.1080p.HDTV.x264-ESiR-Sample.mkv: FLV
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Shrek.2.2004.1080p.HDTV.x264-ESiR-Sample.mkv: FLV
2013-10-16 16:03:58,053 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 72 and profile Flash player
2013-10-16 16:03:58,054 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Sintel_DivXPlus_6500kbps.mkv: FLV
2013-10-16 16:03:58,054 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Sintel_DivXPlus_6500kbps.mkv: FLV
2013-10-16 16:03:58,054 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Sintel_DivXPlus_6500kbps.mkv: FLV

to
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 71 and profile Flash player
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 'Shrek.2.2004.1080p.HDTV.x264-ESiR-Sample.mkv': FLV
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 'Shrek.2.2004.1080p.HDTV.x264-ESiR-Sample.mkv': FLV
2013-10-16 16:03:58,051 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 'Shrek.2.2004.1080p.HDTV.x264-ESiR-Sample.mkv': FLV
2013-10-16 16:03:58,053 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 72 and profile Flash player
2013-10-16 16:03:58,054 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 'Sintel_DivXPlus_6500kbps.mkv': FLV
2013-10-16 16:03:58,054 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 'Sintel_DivXPlus_6500kbps.mkv': FLV
2013-10-16 16:03:58,054 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 'Sintel_DivXPlus_6500kbps.mkv': FLV

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Wed Oct 16, 2013 8:11 pm
by zip
I can change that, do you need it only for this log entries? Or other file names too? You'd have to give me all the places you want the filenames quoted.

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Thu Oct 17, 2013 9:01 am
by Illico
zip wrote:I can change that, do you need it only for this log entries? Or other file names too? You'd have to give me all the places you want the filenames quoted.

Thanks Zip, but I still have problems with some French series title with &apos; character, like C'est, L', etc. So the previous modification is not a 100% solution.
Do you think that double quote (") could be used instead? (I don't think that this character is used on file/series title in any language)

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Thu Oct 17, 2013 11:12 am
by zip
Sure, remind me in the Beta stage pls

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Sun Oct 05, 2014 4:33 pm
by Illico
zip wrote:Sure, remind me in the Beta stage pls


Do you think that it could be added to the next 1.5 version ?

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Mon Sep 21, 2015 10:04 pm
by rscm
Hi
Thanks for the UDL, I use an alternative color theme on NP++. So I made a version that can look better with that theme (HotFudgeSundae)

Bye

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Sun Jan 03, 2016 10:56 pm
by bobsmo
finally got around to installing this, very nice , +1.

Re: Serviio.log - Notepad++ syntax highlighting

PostPosted: Fri Jul 01, 2016 9:39 am
by Rapper_skull
There are still some issues with names containing apostrophes. Maybe escaping them with another one will solve the problem, like using double quotes.

EDIT: Also another problem are rows like this:
  Code:
DEBUG [MediaFileIndexer] Found file 'media.mkv', checking if it's already in the Library

Maybe you can replace "it's" with "it is".