- Posts: 88
- Thank you received: 7
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Plugin debug development
- tassoman
- Topic Author
- Offline
- Premium Member
Less
More
3 years 2 months ago #211860
by tassoman
«All your survey answers are belong to us »
Plugin debug development was created by tassoman
Hello there when I start developing a plugin I config LS in debug mode 2.
Then, how can I send debug messages inside the web interface or inside a logfile, from my plugin?
is there something like $this->addMessageDebug($variable) inside PluginBase I extended?
Can I do the same with notice, warns and errors?
Also, on errors, is it enough to try catch throw a general \Exception?
Sorry for writing this but I can't find a useful documentation on plugin writing.
Thanks in advance.
Then, how can I send debug messages inside the web interface or inside a logfile, from my plugin?
is there something like $this->addMessageDebug($variable) inside PluginBase I extended?
Can I do the same with notice, warns and errors?
Also, on errors, is it enough to try catch throw a general \Exception?
Sorry for writing this but I can't find a useful documentation on plugin writing.
Thanks in advance.
«All your survey answers are belong to us »
The topic has been locked.
- bismark
- Offline
- Senior Member
Less
More
- Posts: 70
- Thank you received: 15
2 years 8 months ago - 2 years 8 months ago #218962
by bismark
Replied by bismark on topic Plugin debug development
you can use
within your Plugin
it will create a file /tmp/runtime/plugin.log
Code:
$this->log('HERE I AM');
it will create a file /tmp/runtime/plugin.log
Last edit: 2 years 8 months ago by bismark.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
2 years 8 months ago #219180
by DenisChenu
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.
Replied by DenisChenu on topic Plugin debug development
in file by default, but you can do what you want
manual.limesurvey.org/Optional_settings#Logging_settings
manual.limesurvey.org/Optional_settings#Logging_settings
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.