A few questions about basic logger
I thought I would take this plugin through a trial run. but....
It's not entirely intuitive from the instructions and a couple of questions.
1) Do I have to configure anything at all to make it work out of the box?
2)does the xml have to be configured or only if I want to change it?
it says it will create a database of log messages if I read it correctly.
3) is this how one would use it
would I put these lines in a function anywhere in the core code or would i put in a plugin in an event function.
$Logger = LoggerPlugin::GetLogger();
// Log several messages, one for each available level
$Logger->trace("here is my $variable");
I didn't see any table created in my vanilla database, am I doing anything wrong.
5) in the code there seems to be code for adding logger to sidemenu in dashboard - it doesn't appear. After checking manage in the permissions.
with out spending a whole lot of time trying to figure this out - @businessdad anyone know the answers to above.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Comments
Thanks for your feedback. I'm aware that the basic plugins is not 100% intuitive, in fact 90% of the time spent creating the advanced one was for the User Interface. It requires at least a basic knowledge of Log4php to be able to tweak it.
To answer your questions.
<level value="TRACE" />
in config.xml file, in the<root>
node.Update
I checked the installation of the plugin, it indeed adds the Logger menu entry in the Addons section. What version of Vanilla are you using?
My shop | About Me
works. Community feedback is invaluable, thanks for providing it.
My shop | About Me
Done! Documentation is now up to date, file readme.html explains what I wrote in reply to peregrine.
My shop | About Me
thx. @businessdad. will get back you you on the sidemenu thing and report back later.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@businessdad
see - http://vanillaforums.org/discussion/comment/170196/#Comment_170196
since you are updating - might as well change these....
probably this too
$Menu = &$Sender->EventArguments['SideMenu'];
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@businessdad
Interesting plugin thanks. got it working.
also in readme html. typo "fatail", if cut and pasted will generate fatal error
$Logger->fatail('This is an FATAL message');
should be
$Logger->fatal('This is an FATAL message');
P.S. sidemenu issue I mentioned is not a problem. I misinterpreted the line.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine Thanks, I didn't notice it. In fact, in the plugin description the command is correct. I'll take note of it and fix it with next release. I use a Continuous Integration server for building, testing and packaging my plugins, but it's not wise to release a new package so late in the evening.
Change of plan
The
&$Sender
issue is more serious, it's worth fixing it immediately. New plugin coming.My shop | About Me
Done! Plugin updated. Thanks again for the feedback.
My shop | About Me
pleasure.
someday, i'll drop you a line - I'd like to hear more about your unit testing, type of debugger (eclipse, netbeans, etc) and other cool stuff.
So far I've used netbeans as a debugger - but it always crashes looking at watch variables. I tried eclipse without much success.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I can answer you about the debugger: none. I simply use logging as wisely as I can (that's why I create a logger for Vanilla, a framework without a logger is like something without something) and the good old var_dump.
In my career I worked with dozens of programming languages, most of which had their own IDE, and step-by-step debugging was a must. With PHP, I just find it simpler to debug "manually". So far, it's working.
My shop | About Me
I just tested logger plugin in v 2.1 - works fine.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks for the confirmation
My shop | About Me