LogService Class
Log service (stores client-side logs, warns, errors, ... into application log).
Item Index
Methods
Methods
_storeToApplicationLog
-
category
-
message
-
formattedMessage
Stores given message to application log.
Properties
_originalMethodsCache
Object[]
private
Cache containing references to original Logger methods. Cache is needed to restore original methods on service destroy.
Default: null
applicationLogModelName
String
The name of a model that represents log entity.
Default: 'i-i-s-caseberry-logging-objects-application-log'
Example:
// Log service 'applicationLogModelName' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
applicationLogModelName: 'custom-application-log'
}
...
}
...
};
enabled
Boolean
Flag: indicates whether log service is enabled or not (if not, nothing will be stored to application log).
Default: false
Example:
// LogServise 'enabled' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true
}
...
}
...
};
errorMessageFilterActive
Boolean
Flag: indicates whether log service will skip error messages that defined in errorMessageFilters array variable.
Default: false
Example:
// Log service 'errorMessageFilterActive' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
errorMessageFilterActive: true
}
...
}
...
};
errorMessageFilters
Array
Error messages which must be skipped when flag errorMessageFilterActive is true.
Default: [{ category: 'PROMISE', message: "TransitionAborted" }]
showPromiseErrors
Boolean
Flag: indicates whether log service will display promise errors in console.
Default: false
Example:
// Log service 'showPromiseErrors' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
showPromiseErrors: true
}
...
}
...
};
storeDebugMessages
Boolean
Flag: indicates whether log service will store 'DEBUG' messages to application log or not.
Default: false
Example:
// Log service 'storeDeprecationMessages' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
storeDebugMessages: true
}
...
}
...
};
storeDeprecationMessages
Boolean
Flag: indicates whether log service will store 'DEPRECATION' messages to application log or not.
Default: false
Example:
// Log service 'storeDeprecationMessages' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
storeDeprecationMessages: true
}
...
}
...
};
storeErrorMessages
Boolean
Flag: indicates whether log service will store error messages to application log or not.
Default: true
Example:
// Log service 'storeErrorMessages' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
storeErrorMessages: false
}
...
}
...
};
storeInfoMessages
Boolean
Flag: indicates whether log service will store 'INFO' messages to application log or not.
Default: false
Example:
// Log service 'storeInfoMessages' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
storeInfoMessages: true
}
...
}
...
};
storeLogMessages
Boolean
Flag: indicates whether log service will store 'LOG' messages to application log or not.
Default: false
Example:
// Log service 'storeLogMessages' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
storeLogMessages: true
}
...
}
...
};
storePromiseErrors
Boolean
Flag: indicates whether log service will store promise errors to application log or not.
Default: false
Example:
// Log service 'storePromiseErrors' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
storePromiseErrors: true
}
...
}
...
};
storeWarnMessages
Boolean
Flag: indicates whether log service will store 'WARN' messages to application log or not.
Default: false
Example:
// Log service 'storeWarnMessages' setting could be also defined through application config/environment.js
module.exports = function(environment) {
var ENV = {
...
APP: {
...
log: {
enabled: true,
storeWarnMessages: true
}
...
}
...
};