I'm trying to set the Notes for a desktop log of my apache access.log file. The problem is that the Note is displayed from the top, not scrolled to the bottom as I want it to be. I'll be glad if someone shares an idea, how this could be done Thanks in advance!
It is currently May 2nd, 2024, 6:19 pm
Enigma - Help using Notes with log files
-
- Posts: 11
- Joined: December 7th, 2011, 1:39 pm
Enigma - Help using Notes with log files
Last edited by jsmorley on October 16th, 2012, 1:52 pm, edited 1 time in total.
Reason: Edited to use [hsimg][/hsimg] for large images.
Reason: Edited to use [hsimg][/hsimg] for large images.
Re: Enigma - Help using Notes with log files
a way to do this is to use a Windows port of the UNIX tail command to write the last lines of the log file to a different file and display that file instead.
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: Enigma - Help using Notes with log files
Open Enigma\@Resources\Measures\Notes.inc. Look for the "STRIP CONTENT DIVIDER & FORMAT LISTS" section, and change it to the following.
Note that this will not handle line wrapping in any graceful way, so you should probably remove ClipString=1 from the meter style.
Code: Select all
-- STRIP CONTENT DIVIDER & FORMAT LISTS
local Divider = SELF:GetOption('ContentDivider','')
Content = Content:gsub(Divider..'.*', '')
Content = Content:gsub('- ', '· ')
local Lines = {}
for Line in Content:gmatch('[^\n]+') do
table.insert(Lines, Line)
end
local LimitNumberOfLines = 20 --Change this to the number of lines from the bottom that you want to show.
for i = 1, (#Lines - LimitNumberOfLines) do
table.remove(Lines, 1)
end
Content = table.concat(Lines, '\n')
Queue['Content'] = Content
-
- Posts: 11
- Joined: December 7th, 2011, 1:39 pm
Re: Enigma - Help using Notes with log files
I seem not to have such Notes.inc file. Only Notes.lua in there Opened it and no such stuff in there, but still code.
EDIT: Rainmeter version: 2.3.2
EDIT: Rainmeter version: 2.3.2
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: Enigma - Help using Notes with log files
Sorry, Notes.lua is indeed the file that I meant.bogitospeca wrote:I seem not to have such Notes.inc file. Only Notes.lua in there Opened it and no such stuff in there, but still code.
EDIT: Rainmeter version: 2.3.2
The code that I described is found in the latest version of Enigma. I don't recall the specific changes to Notes.lua from 3 to 4; it should still be possible to apply the same process, but if you aren't comfortable editing Lua code, the safe option is simply to upgrade.
-
- Posts: 11
- Joined: December 7th, 2011, 1:39 pm
Re: Enigma - Help using Notes with log files
EDIT: my bad
-
- Posts: 271
- Joined: February 16th, 2011, 12:46 am
- Location: California
Re: Enigma - Help using Notes with log files
You might look into PSTools - I needed something similar for event logs on a remote machine. Installed PSTools, wrote a couple command line based scripts and I can filter, range and display whatever I need.