Welcome to the LimeSurvey Community Forum

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

V3 logging feature in plugins

More
5 years 8 months ago #192286 by bulgin
I love that V3 now has logging enabled by adding:

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

Instructions here: www.limesurvey.org/manual/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.
More
5 years 8 months ago #192324 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
5 years 8 months ago #192325 by DenisChenu

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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
5 years 8 months ago #192333 by bulgin
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.
More
5 years 8 months ago #192512 by DenisChenu
See : www.limesurvey.org/manual/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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose