Module: siteKiosk.log

This module offers logging functionality. All log entries created with this module will be inserted into the SiteKiosk log and sent to SiteRemote.
The parameters for most of the functions expect a facility, a type and a message. The facility can be chosen from siteKiosk.log.facility, the available options are below. The types in siteKiosk.log.types are documented below as well. The message is an arbitrary string.

Example

// assume something is not working right with siteKiosk, this will
// log an error
siteKiosk.log.error(
    siteKiosk.log.facility.siteKiosk,
    siteKiosk.log.type.generic,
    'SiteKiosk encountered an error, please help!'
);

Members

<static> facility :string

Log facilities.
Type:
  • string
Properties:
Name Type Default Description
siteKiosk string SiteKiosk Android
siteCash string SiteCash
siteCoach string SiteCoach
siteRemote string SiteRemote Client
maintenance string Maintenance

<static> level :number

Log levels.
Type:
  • number
Properties:
Name Type Default Description
verbose number 0
debug number 10
info number 20
warning number 30
error number 40
shouldNotHappen number 50

<static> type :number

Log types.
Type:
  • number
Properties:
Name Type Default Description
generic number 0
siteKioskGeneric number 1000
siteKioskStarted number 1001
siteKioskClosed number 1002
siteKioskCrashed number 1003
navigation number 1004
frameNavigation number 1005
sessionEnd number 1006
sessionBegin number 1007
printer number 1008
eMail number 1009
dialUpGeneric number 1010
dialUpConnected number 1011
dialUpDisconnected number 1012
script number 1013
customEvent number 1014
faceDisappeared number 1015
siteSkinGeneric number 1100
siteCashGeneric number 2000
siteCashStarted number 2001
siteCashClosed number 2002
siteCashSessionBegin number 2003
siteCashSessionEnd number 2004
siteCashCredit number 2005
siteCashDebit number 2006
siteCashDevicesGenric number 2100
acosSmartCard number 2101
emp800 number 2102
pcCredit number 2103
dummyDevice number 2104
globalBill number 2105
siteCafe number 2106
ccTalk number 2107
codeAccess number 2108
mmiCoinCollector number 2109
smileyNv4 number 2110
hw200Usb number 2111
creditCard number 2112
mobilHandel number 2113
avtKrone number 2114
timeLimitter number 2115
azkoyen number 2116
loeweIoCard number 2117
microcoinTl4 number 2118
pulseDevice number 2119
cointUsbInterface number 2120
siteCoachGeneric number 3000
siteDogGeneric number 4000
siteCamGeneric number 5000
siteRemoteGeneric number 6000
siteRemoteStartup number 6001
siteRemoteShutdown number 6002
remoteClientStartup number 7000
remoteClientShutdown number 7001
applicationStarted number 7005
applicationClosed number 7006
synchronizationStarted number 8000
synchronizationFinished number 8001
synchronizationSuspended number 8002
synchronizationResumed number 8003
synchronizationStopped number 8004

Methods

<static> debug(facility, type, message)

Writes a debug message into the log.
Parameters:
Name Type Description
facility string The log facility/category
type number The log messages type
message string The log message

<static> error(facility, type, message)

Writes an error into the log.
Parameters:
Name Type Description
facility string The log facility/category
type number The log messages type
message string The log message

<static> info(facility, type, message)

Writes an info message into the log.
Parameters:
Name Type Description
facility string The log facility/category
type number The log messages type
message string The log message

<static> log(level, facility, type, message, params)

Logs the provided message with the specified log level, facility name and type.
Parameters:
Name Type Argument Description
level number The log level
facility string The log facility/category
type number The log messages type
message string The log message
params Object <optional>
An params object with string values to provide additional information

<static> shouldNotHappen(facility, type, message)

Writes a "this should not happen" message into the log.
Parameters:
Name Type Description
facility string The log facility/category
type number The log messages type
message string The log message

<static> verbose(facility, type, message)

Writes a verbose message into the log.
Parameters:
Name Type Description
facility string The log facility/category
type number The log messages type
message string The log message

<static> warn(facility, type, message)

Writes a warning into the log.
Parameters:
Name Type Description
facility string The log facility/category
type number The log messages type
message string The log message