Hello,
First of all - thank you for the questions :)
> Q1) In SampleApp.mxml, what is the relevance of
>
> ----- Log.getLogger("org.room13.slf4fx.MyApplication");
> ----- Log.addTarget(new Slf4FxLoggingTarget("myApplication",
> "mySecret"));
>
> what is "MyApplication" in getLogger()?
> what are "myApplication" and "mySecret" in addTarget()?
>
Log.getLogger(...) returns named logger logger. It is usual
development practice that each class has own logger. So
"org.room13.slf4fx.MyApplication" here is just class name and it will
be passed to server side as part of slf4j log record category.
Following is cite from Usage page
http://code.google.com/p/slf4fx/wiki/Usage
===
All log events from applications will have category in form:
slf4fx.APPLICATION_ID.LOG_RECORD_CATEGORY
Where slf4fx is constant prefix. APPLICATION_ID is application name
given as parameter to Slf4FxLoggingTarget on client side. Application
id is optional parameter. LOG_RECORD_CATEGORY is logger category on
client side.
===
new Slf4FxLoggingTarget("myApplication", "mySecret")
creates SLF4Fx logging target that sends all incoming records to
slf4fx server. The constructor accepts 4 parameters:
public function Slf4FxLoggingTarget(applicationName:String,
secret:String = "",
logServer:String =
"localhost", logServerPort:uint = 18888)
As you can see the only required parameter is application name. That
parameter also will be used as part of slf4fj log record category.
It's required since you may have more than one flex application hosted
on the server and this will help you to separate log records from all
those applications. You can use any meaningful value for this
parameter but avoid using spaces as it may lead to some problems on
logging framework used on server side. In example it was
"myApplication" because it is my application :)
"secret" is the way to get logging from particular application
instance. By default slf4fx server accepts all incoming requests. But
if you somehow define secret for the application instance on client
side and provides the same secret on server side then server will
accept records only from that application instance. But this is not
your case and you can omit second parameter. logServer and
logServerPort describe themselves.
> Q2) On the server side, will the slf4fx logging be separate from the
> tomcat logging?
Yes it will. But configuration depends on the way you use for
integration slf4fx server with your web application. You can use
standalone slf4fx server. In this case you already have log file
separated from tomcat logs. If you integrates slf4fx into your web
application then you have to properly configure selected logging
framework. Anyway logging configuration described in "Configure
logging" of
http://code.google.com/p/slf4fx/wiki/Usage
>
> Q3) Will the logging always run in a console window?
No. See answer on previous question.
>
> Rest of the questions probably after your response
>
> Thanks
> Vikku77
Thank you :)
P.S. I know java better then English :( so I just hope my answers are
clear enough