Skip to the content.

jFactory > Reference > Traits > TraitLog

TraitLog

Methods / Usages

Attachs a configurable console logger to the component, using JFactoryLogger.

Although it is not directly supported by TraitLog, a JFactoryLogger can also:

Inherited config

By default, for all components, logs are :

[//]: # (TODO This behavior can be changed by setting jFactoryConfig.TraitLog.enabled = true false)

Component config

Injected Methods

$log(obj {*} [, ...obj {*}])

$logWarn(obj {*} [, ...obj {*}])

$logErr(obj {*} [, ...obj {*}])

Usages

myComponent.$log("mouse enter the element", domTarget)
myComponent.$logWarn("request timeout", request)
myComponent.$logErr("error:", errorObject)