/ fm / liveswitch / Log
Class: Log
fm.liveswitch.Log
Log utility class.
Table of contents
Constructors
Methods
- getTypeString
- addProvider
- debug
- error
- fatal
- flush
- getDefaultLogLevel
- getIsDebugEnabled
- getIsErrorEnabled
- getIsFatalEnabled
- getIsInfoEnabled
- getIsVerboseEnabled
- getIsWarnEnabled
- getLogLevel
- getLogger
- getProvider
- getProviders
- info
- registerProvider
- removeProvider
- removeProviders
- setDefaultLogLevel
- setLogLevel
- setProvider
- setTagOverride
- unregisterProvider
- unregisterProviders
- verbose
- warn
- writeLine
Constructors
constructor
+ new Log(): Log
Returns: Log
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:13
Methods
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:9
addProvider
▸ Static
addProvider(provider
: LogProvider): void
Registers a log provider as a logging target. Alias for RegisterProvider.
Parameters:
Name | Type | Description |
---|---|---|
provider |
LogProvider | The new provider. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:34
▸ Static
addProvider(provider
: LogProvider, level
: LogLevel): void
Registers a log provider as a logging target, setting its log level in the process. Alias for RegisterProvider.
Parameters:
Name | Type | Description |
---|---|---|
provider |
LogProvider | The new provider. |
level |
LogLevel | The log level. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:44
debug
▸ Static
debug(context
: LogContext, message
: string): void
Logs a debug-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:65
▸ Static
debug(context
: LogContext, message
: string, ex
: Exception): void
Logs a debug-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:74
▸ Static
debug(message
: string): void
Logs a debug-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:81
▸ Static
debug(message
: string, ex
: Exception): void
Logs a debug-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:89
error
▸ Static
error(context
: LogContext, message
: string): void
Logs an error-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:119
▸ Static
error(context
: LogContext, message
: string, ex
: Exception): void
Logs an error-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:128
▸ Static
error(message
: string): void
Logs an error-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:135
▸ Static
error(message
: string, ex
: Exception): void
Logs an error-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:143
fatal
▸ Static
fatal(context
: LogContext, message
: string): void
Logs a fatal-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:173
▸ Static
fatal(context
: LogContext, message
: string, ex
: Exception): void
Logs a fatal-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:182
▸ Static
fatal(message
: string): void
Logs a fatal-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:189
▸ Static
fatal(message
: string, ex
: Exception): void
Logs a fatal-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:197
flush
▸ Static
flush(): void
Blocks until all logs are written out.
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:225
getDefaultLogLevel
▸ Static
getDefaultLogLevel(): LogLevel
Gets the default log level.
Returns: LogLevel
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:238
getIsDebugEnabled
▸ Static
getIsDebugEnabled(): boolean
Gets a value indicating whether logging is enabled for debug-level messages for at least one of the registered providers.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:252
getIsErrorEnabled
▸ Static
getIsErrorEnabled(): boolean
Gets a value indicating whether logging is enabled for error-level messages for at least one of the registered providers.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:266
getIsFatalEnabled
▸ Static
getIsFatalEnabled(): boolean
Gets a value indicating whether logging is enabled for fatal-level messages for at least one of the registered providers.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:280
getIsInfoEnabled
▸ Static
getIsInfoEnabled(): boolean
Gets a value indicating whether logging is enabled for info-level messages for at least one of the registered providers.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:294
getIsVerboseEnabled
▸ Static
getIsVerboseEnabled(): boolean
Gets a value indicating whether logging is enabled for verbose-level messages for at least one of the registered providers.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:308
getIsWarnEnabled
▸ Static
getIsWarnEnabled(): boolean
Gets a value indicating whether logging is enabled for warn-level messages for at least one of the registered providers.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:322
getLogLevel
▸ Static
getLogLevel(): LogLevel
Gets the default log level.
deprecated
Use DefaultLogLevel instead.
Returns: LogLevel
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:391
getLogger
▸ Static
getLogger(tag
: string): ILog
Get a logger for a specific Tag.
Parameters:
Name | Type | Description |
---|---|---|
tag |
string | The tag to log to. |
Returns: ILog
A ILog that will log to the specified tag.
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:337
▸ Static
getLogger(tag
: string, level
: LogLevel): ILog
Get a logger for a specific Tag.
Parameters:
Name | Type | Description |
---|---|---|
tag |
string | The tag to log to. |
level |
LogLevel | Logger's default log level. |
Returns: ILog
A ILog that will log to the specified tag.
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:346
▸ Static
getLogger(type
: Type): ILog
Get a logger for a specific Tag. The tag is taken from the class namespace and name.
Parameters:
Name | Type | Description |
---|---|---|
type |
Type | The type to use as the tag. |
Returns: ILog
A ILog that will log to the specified tag.
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:354
▸ Static
getLogger(type
: Type, level
: LogLevel): ILog
Get a logger for a specific Tag. The tag is taken from the class namespace and name.
Parameters:
Name | Type | Description |
---|---|---|
type |
Type | The type to use as the tag. |
level |
LogLevel | Logger's default log level. |
Returns: ILog
A ILog that will log to the specified tag.
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:363
getProvider
▸ Static
getProvider(): LogProvider
Gets the first log provider.
Returns: LogProvider
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:404
getProviders
▸ Static
getProviders(): LogProvider[]
Gets the log providers.
Returns: LogProvider[]
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:418
info
▸ Static
info(context
: LogContext, message
: string): void
Logs an info-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:433
▸ Static
info(context
: LogContext, message
: string, ex
: Exception): void
Logs an info-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:442
▸ Static
info(message
: string): void
Logs an info-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:449
▸ Static
info(message
: string, ex
: Exception): void
Logs an info-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:457
registerProvider
▸ Static
registerProvider(provider
: LogProvider): void
Registers a log provider as a logging target.
Parameters:
Name | Type | Description |
---|---|---|
provider |
LogProvider | The provider. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:486
▸ Static
registerProvider(provider
: LogProvider, level
: LogLevel): void
Registers a log provider as a logging target, setting its log level in the process.
Parameters:
Name | Type | Description |
---|---|---|
provider |
LogProvider | The provider. |
level |
LogLevel | The log level. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:495
removeProvider
▸ Static
removeProvider(provider
: LogProvider): boolean
Unregisters a log provider as a logging target. Alias for UnregisterProvider.
Parameters:
Name | Type | Description |
---|---|---|
provider |
LogProvider | The provider. |
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:520
removeProviders
▸ Static
removeProviders(): void
Unregisters all log providers as logging targets. Alias for UnregisterProviders.
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:534
setDefaultLogLevel
▸ Static
setDefaultLogLevel(value
: LogLevel): void
Sets the default log level.
Parameters:
Name | Type |
---|---|
value |
LogLevel |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:547
setLogLevel
▸ Static
setLogLevel(value
: LogLevel): void
Sets the default log level.
deprecated
Use DefaultLogLevel instead.
Parameters:
Name | Type |
---|---|
value |
LogLevel |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:561
setProvider
▸ Static
setProvider(value
: LogProvider): void
Sets the first log provider.
Parameters:
Name | Type |
---|---|
value |
LogProvider |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:574
setTagOverride
▸ Static
setTagOverride(tag
: string, level
: LogLevel): void
Override the default log level for a specific tag.
Parameters:
Name | Type | Description |
---|---|---|
tag |
string | The Tag to set the log level to. |
level |
LogLevel | The new loglevel to use. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:590
unregisterProvider
▸ Static
unregisterProvider(provider
: LogProvider): boolean
Unregisters a log provider as a logging target.
Parameters:
Name | Type | Description |
---|---|---|
provider |
LogProvider | The provider. |
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:604
unregisterProviders
▸ Static
unregisterProviders(): void
Unregisters all log providers as logging targets.
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:617
verbose
▸ Static
verbose(context
: LogContext, message
: string): void
Logs a verbose-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:632
▸ Static
verbose(context
: LogContext, message
: string, ex
: Exception): void
Logs a verbose-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:641
▸ Static
verbose(message
: string): void
Logs a verbose-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:648
▸ Static
verbose(message
: string, ex
: Exception): void
Logs a verbose-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:656
warn
▸ Static
warn(context
: LogContext, message
: string): void
Logs a warn-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:686
▸ Static
warn(context
: LogContext, message
: string, ex
: Exception): void
Logs a warn-level message.
Parameters:
Name | Type | Description |
---|---|---|
context |
LogContext | The log context. |
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:695
▸ Static
warn(message
: string): void
Logs a warn-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:702
▸ Static
warn(message
: string, ex
: Exception): void
Logs a warn-level message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
ex |
Exception | The exception. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:710
writeLine
▸ Static
writeLine(text
: string): void
Writes a line of text to the log.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The text to write to the log. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Log.ts:739