[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jfw] Re: Configuring a CLI application for logging

Fixed it myself. Checked out docs on Registry (class of $config used in AbstractCliApplication constructor) and AbstractApplication classes.

Referring to those docs, was able to setup  a configuration file and load it using Registry class.

I am loving this :)

On Sunday, October 25, 2015 at 10:48:15 AM UTC+5:30, Karthik Narendran wrote:

I was just trying out Joomla! Framework, and so far, got a simple CLI application, displaying "Hello World!" to run fine. Thanks to the wonderful documentation at https://github.com/joomla-framework/application/blob/master/README.md

While attempting to include logging, I stumbled across a problem. The docs mentioned usage of $this->get('logger.path') as the path of the log file generated. The problem is that this path is never being set. The comments in the sample program mentions a configuration file. Now, the issue is configuring the application.

Another sample program at beginning of the documentation mentions overriding of the constructor, where arguments passed to the constructor includes an Input and a Registry object. Maybe these would help. Not yet sure how to implement them.

Any help would be greatly appreciated. Thanks.

Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.