SalesforceLogger

open class SalesforceLogger

A simple logger that allows components to log statements of different log levels. This class also provides the ability to break down logs at the component level and set different log levels for different components. The available options for log output are console and file.

Author

bhariharan

Types

Link copied to clipboard
enum Level
An enumeration of log levels.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun d(tag: String, message: String)
open fun d(tag: String, message: String, e: Throwable)
Logs a debug log line.
Link copied to clipboard
Disables file logging.
Link copied to clipboard
open fun e(tag: String, message: String)
open fun e(tag: String, message: String, e: Throwable)
Logs an error log line.
Link copied to clipboard
open fun enableFileLogging(maxSize: Int)
Enables file logging.
Link copied to clipboard
open fun flushComponents()
Wipes all components currently being logged.
Link copied to clipboard
open fun getComponents(): Set<String>
Returns the set of components that have loggers associated with them.
Link copied to clipboard
open fun getLogger(componentName: String, context: Context): SalesforceLogger
open fun getLogger(componentName: String, context: Context, salesforceLogReceiver: SalesforceLogReceiver): SalesforceLogger
Returns the Salesforce logger instance associated with the named component.
Link copied to clipboard
open fun i(tag: String, message: String)
open fun i(tag: String, message: String, e: Throwable)
Logs an info log line.
Link copied to clipboard
Returns if file logging is enabled or not.
Link copied to clipboard
open fun log(level: SalesforceLogger.Level, tag: String, message: String)
open fun log(level: SalesforceLogger.Level, tag: String, message: String, e: Throwable)
Logs a log line of the specified level.
Link copied to clipboard
open fun resetLoggerPrefs(context: Context)
Resets the stored logger prefs.
Link copied to clipboard
Sets the factory for Salesforce log receivers.
Link copied to clipboard
open fun v(tag: String, message: String)
open fun v(tag: String, message: String, e: Throwable)
Logs a verbose log line.
Link copied to clipboard
open fun w(tag: String, message: String)
open fun w(tag: String, message: String, e: Throwable)
Logs a warning log line.