V3 logging feature in plugins

More
9 months 1 week ago #192286 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?

Please Log in to join the conversation.

More
9 months 1 week 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 service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
9 months 1 week 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 service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
9 months 1 week 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?

Please Log in to join the conversation.

More
8 months 3 weeks ago #192512 by DenisChenu
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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now