[flexcoders] Logging API

2009-09-15 Thread reflexactions
Am I missing something or as much as I can write a class that implements 
ILogger there is no way to actually use it?

I can't see anyway to specify the ILogger to be used and Log just uses 
LogLogger by default, as per usual all the variables are private in Log so 
can't be accessed, the class is static so cant be overriden, so the only option 
seems to be to clone the Log class and then just not use Log anywhere in our 
apps??

Also once logging a category there is no way to stop short of calling flush and 
dumping everything?



Re: [flexcoders] Logging API

2009-09-15 Thread Sönke Rohde
You can add your own logger with Log.addTarget(yourLoggerInstance) or  
simply define it in MXML like here: http://soenkerohde.com/2008/08/sos-logging-target/



On 15.09.2009, at 10:44, reflexactions wrote:

Am I missing something or as much as I can write a class that  
implements ILogger there is no way to actually use it?


I can't see anyway to specify the ILogger to be used and Log just  
uses LogLogger by default, as per usual all the variables are  
private in Log so can't be accessed, the class is static so cant be  
overriden, so the only option seems to be to clone the Log class and  
then just not use Log anywhere in our apps??


Also once logging a category there is no way to stop short of  
calling flush and dumping everything?








[flexcoders] Logging API

2006-10-13 Thread John Wilker



I'm working on a framework/interface for the logging API. Most of it makes sense to me, but one part is still not jiving for me.My goal is to make a dynamic framework that can write to different targets based on the situation or event type.
I haven't figured out how, in AS to define my targets.Any thoughts?THanks!!-- John WilkerVice President Software Development/WriterRed Omega Solutions, Inc.
www.johnwilker.com / www.red-omega.comEverything changes, nothing remains without change. 	~Buddha c.483 bc

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



[flexcoders] Logging API issue

2006-05-19 Thread Xavi Beumala



Hi all,I'm playing with f2b3 new logging api and trying to use it in a similar way I'd use java.util.logHowever if the category of the logger contains the : character an exception is thrown. Reviewing the code, I've seen in the Log class a function called hasIllegalCharacters() which explicitly prevents us from using a : character in the category name.
I think a really common log would be as follows:[DEBUG] 5/19 23:05 - com.code4net.log.TestLog TestLog object createdBut due to the syntax of the string returned by getQualifiedClassName() the category would be 
com.code4net.log:TestLog. Here's the code I'm playing with:codepackage com.code4net.rpc { import mx.logging.Log; import mx.logging.ILogger; import flash.utils.getQualifiedClassName
; import mx.logging.LogEventLevel;  public class TestLog {  private var log:ILogger = Log.getLogger(getQualifiedClassName(this).replace(::,.));public function TestLog() {
   log.log(LogEventLevel.DEBUG,TestLog object created);  } }}/codeAs shown in the code : can be replaced with . but IMHO in large applications this could become an important performance issue.
Are category names restricted for some especial reason? Is there any other way to go?BestXavi Beumala






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.