History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AJF-8
Type: Improvement Improvement
Status: Closed Closed
Resolution: Incomplete
Priority: Major Major
Assignee: Florian Traverse
Reporter: Florian Traverse
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Archetype

Add a configurable Log4J like interface for at least components

Created: 29/Jan/08 08:58 PM   Updated: 18/Jun/08 10:36 AM
Component/s: None
Affects Version/s: 0.1.0, 0.1.5
Fix Version/s: 0.8.0-beta, 0.8.0


 Description  « Hide
You can define a Log format prepending to log (the most useful may be the Objectand method called) and different level of logging for everything from a package to a Class in Java.

What about doing this in JS ?

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Florian Traverse - 22/May/08 04:03 PM
I've added a new methodBuilder for this logging system which is storing the method name and object package information in the Function object itself, which is a very good and useful way to store this static content! It's just a good way to store metadata for the function.

I've modified the FirebugLogger a bit in order to prepend the component and function name in bracket before the logging itself.

So this functionality works already very well with Components :) !

Archetype.Class.create already add the method name in each function but cannot know the class name in it's current form. Prototype Class.create would have to be proxied in order to do the same thing. Im' looking for a way that gives an optional argument in Archetype.Class.create and Class.create

Having a full Log4J like interface, even with "basic" classes can be implemented quite easily, you'll just have to store the class name and the function name in the function itself. However, we'll have to add some common code between loggers, and probably some new concept, like "log filters" and "log formatters" in order to have something quite perfect :)



Florian Traverse - 15/Jun/08 09:58 PM
Partially done with firebug logger, mays improve a bit for 0.8.0 but should have a total log4j like configuration only for 0.9.0.

See AJF-43

Florian Traverse - 17/Jun/08 08:15 PM
A basic implementation has been done using a simple method builder and one line change in Archetype.Class.create.

A basic visualization of this is found in the current Firebug Logger, prefixing any text by the path, the classname and the method if this data is available (fully done in components, partial in Archetype.Class as we can't do more).