Skip to main content
Skip table of contents

WriteLogEx

Purpose

Writes a message to the event log, with an optional COLOR specified.


Parameters

Parameter: type
Type: string
Description: This is a string that defines the type of event like "Error" or "Info".  It can be anything you like.  Common message types are "Info","Warning", and "Error".

Parameter: message
Type: string
Description: This is the text to be displayed in the log, like a descriptive error message.

Optional Parameter: color
Type: string
Description: This is the color code that you want associated with the log entry when you view it in the web browser.  The color code must be in the #XXXXXX format, which is the # symbol followed by hexadecimal values for Red, Green, and Blue.  Here are some examples of colors and their color values:

WHITE = "#FFFFFF"
RED = "#FF0000"
BLACK = "#000000"
NAVY = "#000080"
LIGHT BLUE = "#D9F2FF"
LIGHT GRAY  = "#E1E1E1"
PINK = "#FFB6C1"
ORANGE = "#D58000"
GREEN  = "#008000"

Note: At this time, the HomeSeer colors for Error, Warning, and Updater log entries of Red, Orange, and Green respectively are automatic and are still set by HomeSeer.


Returns

None


Example

Sample Code

VB
Sub Main()

	hs.WriteLogEx "Error", "An error has occurred in my script!"
	hs.WriteLogEx "Hello", "I much prefer to see this in Navy Blue!", "#000080"

End Sub


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.