This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

alert type
#1
Hello

I was doing some tests to check if it was possible in the alert manager to have 2 types of alerts, one with acoustic "ALARM" and one without "WARNING" maybe in a different color, so that I can differentiate the messages generated by scripts, or if you can suggest me a way to be able to see both logs in visu.

thank you so much
Reply
#2
You can store other events separately. See this example: https://forum.logicmachine.net/showthrea...26#pid1726
Reply
#3
(23.10.2020, 12:38)admin Wrote: You can store other events separately. See this example: https://forum.logicmachine.net/showthrea...26#pid1726

Perfect I have make all and run , if i wan't change font dimension and color is possible apply a css style in this page ?
Reply
#4
Add style tag before closing head tag. You can add any CSS inside of the style tag.
Code:
<style>
h3 { color: red; }
p { font-weight: bold; }
</style>
</head>
Reply
#5
(23.10.2020, 14:49)admin Wrote: Add style tag before closing head tag. You can add any CSS inside of the style tag.
Code:
<style>
h3 { color: red; }
p { font-weight: bold; }
</style>
</head>
Hi

Tank's for all

but now I see the day in log file is English , nut i have set all in italian language , is possible have the day in Italian ?
Reply
#6
Change eventlog function to replace day names. Keep in mind that this will only work for newly events after the function has been modified.
Code:
function eventlog(text)
  local max = 1000 -- max number of entries

  -- add formatted date
  local date = os.date('%a %d/%m/%Y %T ')

  date = date:gsub('%a+', {
    Mon = 'lun.',
    Tue = 'mar.',
    Wed = 'mer.',
    Thu = 'gio.',
    Fri = 'ven.',
    Sat = 'sab.',
    Sun = 'dom.',
  })

  storage.exec('lpush', 'eventlog', date .. text)
  storage.exec('ltrim', 'eventlog', 0, max - 1)
end
Reply


Forum Jump: