/ fm / liveswitch / LogEvent
Class: LogEvent
fm.liveswitch.LogEvent
Details about a specific log event.
Table of contents
Constructors
Methods
- fmliveswitchLogEventInit
- getContext
- getException
- getLevel
- getLogLevel
- getMessage
- getScope
- getTag
- getThreadId
- getTimestamp
- getTypeString
- setContext
- setException
- setLevel
- setMessage
- setScope
- setTag
- setThreadId
- setTimestamp
- toJson
- toString
- fromJson
- toJson
Constructors
constructor
+ new LogEvent(): LogEvent
Returns: LogEvent
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:32
+ new LogEvent(timestamp
: DateTime, tag
: string, scope
: string, level
: LogLevel, context
: LogContext, message
: string, exception
: Exception, threadId
: number): LogEvent
Initializes a new instance of the [[fm.liveswitch.logEvent]] class.
Parameters:
Name | Type | Description |
---|---|---|
timestamp |
DateTime | The event timestamp. |
tag |
string | The event tag. |
scope |
string | The event scope. |
level |
LogLevel | The event level. |
context |
LogContext | The event context. |
message |
string | The event message. |
exception |
Exception | The event exception, if one exists. |
threadId |
number | The ID of the thread generating the event. |
Returns: LogEvent
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:33
Methods
fmliveswitchLogEventInit
▸ Private
fmliveswitchLogEventInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:29
getContext
▸ getContext(): LogContext
Gets the event context.
Returns: LogContext
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:208
getException
▸ getException(): Exception
Gets the event exception, if one exists.
Returns: Exception
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:220
getLevel
▸ getLevel(): LogLevel
Gets the event level.
Returns: LogLevel
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:232
getLogLevel
▸ getLogLevel(): LogLevel
Gets the level of this log event. Alias for [[fm.liveswitch.logEvent.level]].
Returns: LogLevel
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:245
getMessage
▸ getMessage(): string
Gets the event message.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:257
getScope
▸ getScope(): string
Gets the event scope.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:269
getTag
▸ getTag(): string
Gets the event tag.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:281
getThreadId
▸ getThreadId(): number
Gets the ID of the thread generating the event.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:293
getTimestamp
▸ getTimestamp(): DateTime
Gets the event timestamp.
Returns: DateTime
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:305
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:9
setContext
▸ setContext(value
: LogContext): void
Sets the event context.
Parameters:
Name | Type |
---|---|
value |
LogContext |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:317
setException
▸ setException(value
: Exception): void
Sets the event exception, if one exists.
Parameters:
Name | Type |
---|---|
value |
Exception |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:329
setLevel
▸ setLevel(value
: LogLevel): void
Sets the event level.
Parameters:
Name | Type |
---|---|
value |
LogLevel |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:341
setMessage
▸ setMessage(value
: string): void
Sets the event message.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:361
setScope
▸ setScope(value
: string): void
Sets the event scope.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:373
setTag
▸ setTag(value
: string): void
Sets the event tag.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:385
setThreadId
▸ setThreadId(value
: number): void
Sets the ID of the thread generating the event.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:397
setTimestamp
▸ setTimestamp(value
: DateTime): void
Sets the event timestamp.
Parameters:
Name | Type |
---|---|
value |
DateTime |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:410
toJson
▸ toJson(): string
Serializes this instance to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:422
toString
▸ toString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:433
fromJson
▸ Static
fromJson(logEventJson
: string): LogEvent
Deserializes a log event from JSON.
Parameters:
Name | Type | Description |
---|---|---|
logEventJson |
string | The log event JSON. |
Returns: LogEvent
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:85
toJson
▸ Static
toJson(logEvent
: LogEvent): string
Serializes a log event to JSON.
Parameters:
Name | Type | Description |
---|---|---|
logEvent |
LogEvent | The log event. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LogEvent.ts:177