WriteLogDetail
Purpose
This procedure writes an entry to the HomeSeer log with additional detailed information which can be used by plug-ins and on the log screen to highlight specific log events.
Parameters
Parameter: mType
Type: String
Description: This is the log entry "type", which is first to appear in the log. Usually this is used to indicate a severity or what the log entry pertains to, such as "Error" or "My Script".
Parameter: Message
Type: String
Description: This is the main log message.
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.
Parameter: Priority
Type: Integer
Description: This is an indicator of the priority of the log entry, with the value 0 being unspecified, and the value 1 being the highest priority. Even if a process (e.g. Event) has logging turned off, priority 1 log entries are still written to the log.
Parameter: mFrom
Type: String
Description: This indicates the source of the message. For example: "Cool_Plugin, Main Procedure, Update Section"
Parameter: ErrorCode
Type: Integer
Description: This is an error code number which is meaningful only to the script or plug-in that generated this log entry.
Returns
None
Example
Sample Code
hs.WriteLogDetail("Error", "Oh No, Mr. Bill!", COLOR_RED, 1, "SaturdayNight Plugin", 911)