Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

V3 logging feature in plugins

  • bulgin
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 4 months ago #192286 by bulgin
V3 logging feature in plugins was created by bulgin
I love that V3 now has logging enabled by adding:

$this->log("Your message");

Instructions here: manual.limesurvey.org/Plugins_-_advanced

I'm interested in generally knowing *where* in a plugin file - for example DenisChenus excellent updateTokenByResponse plugin - this entry would be placed in order to enable logging.

As a general question, what is the method for determining where this entry would go in a php file?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #192324 by DenisChenu
Replied by DenisChenu on topic V3 logging feature in plugins
This method must be added in plugin itself …

I personnaly use Yii::log before LimeSurvey have a api function
gitlab.com/SondagesPro/coreAndTools/relo...AnyResponse.php#L815

You can always use whole Yii system in plugin … and in general it's needed.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #192325 by DenisChenu
Replied by DenisChenu on topic V3 logging feature in plugins

bulgin wrote: excellent updateTokenByResponse plugin

Thansk for excellent,

this plugin already have log system :
gitlab.com/SondagesPro/TokenManagement/u...enByResponse.php#L99

But only when an error happen …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • bulgin
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 3 months ago #192333 by bulgin
Replied by bulgin on topic V3 logging feature in plugins
Any advise on using the new V3 logging feature in something other than a plugin? For example, where and in what file would:

$this->log("Your message");

be placed?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago #192512 by DenisChenu
Replied by DenisChenu on topic V3 logging feature in plugins
See : manual.limesurvey.org/Optional_settings#Logging_settings

I always add a log outside the webserver files :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose