I am using Myna.log inside of my logging function. I basically wanted to
wrap some functions around Myna logging to make it a little more like apache
logger.
Then inside of log.log, I am using Myna.Log.
I have info, debug, none right now. If you wrap your logging with those
statements, then you can control the logging level app wide with a setting.
Just seems more efficient and makes for easier trouble shooting down the
road.
On Tue, Oct 12, 2010 at 7:29 PM, Mark Porter <m
...@porterpeople.com> wrote:
> The problem is using "var" inside of onRequestStart. That binds to the
> function scope. You want to either leave it un-var'd or explicitly bind it
> to the global scope: $server.globalScope.log = $application...
> On an unrelated note, why are you not using Myna.log() for logging?
> On Oct 12, 2010 3:26 PM, "Tony Zakula" <tonyzak...@gmail.com> wrote:
> > If you have the following in application.sjs
> > onApplicationStart:function(){ // run if application cache has expired
> $application.set("appEngine",Myna.include($application.directory+"appEngine /appEngine.sjs",{}));
> $application.set("appLog",Myna.include($application.directory+"appEngine/ap pLogging.sjs",{}));
> > },
> > onRequestStart:function(){ // run directly before requested file
> > var appEngine = $application.get("appEngine");
> > var log = $application.get("appLog");
> > $req.handled = appEngine.handleRequest();
> > },
> > Should you be able to call log.mymethod() from inside an appEngine
> function?
> > I keep getting an undefined error.
> > Thanks,
> > Tony
> > --
> > You received this message because you are subscribed to the Google Groups
> "MynaJS-General" group.
> > To post to this group, send email to mynajs-general@googlegroups.com.
> > To unsubscribe from this group, send email to
> mynajs-general+unsubscribe@googlegroups.com<mynajs-general%2Bunsubscribe@go oglegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/mynajs-general?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "MynaJS-General" group.
> To post to this group, send email to mynajs-general@googlegroups.com.
> To unsubscribe from this group, send email to
> mynajs-general+unsubscribe@googlegroups.com<mynajs-general%2Bunsubscribe@go oglegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/mynajs-general?hl=en.