Hopbot log for 2007-09-04 - Helma IRC channel: #helma on irc.freenode.net

2007-09-04:

[20:03] <rjb> ok, so how do i get helma to perform any decent logging of requests?
[20:19] <rjb> bbl
[20:51] <zumbrunn> rjb, define decent ;-)
[20:51] <zumbrunn> usually it's apache that takes care of that if helma is deployed behind apache in production
[20:52] <zumbrunn> or do you mean for debugging?
[20:52] <zumbrunn> then what is "undecent" about the access/event logs written for your app in helma's ./log directory
[20:52] <zumbrunn> ?
[20:54] <rjb> the access log does not contain client ip's nor GET query parameters
[21:14] <rjb> and btw, do you believe it's somehow 'unsafe' to expose helma directly to the world on a public IP?
[21:14] <rjb> w/o putting an apache in front of it?
[21:51] <rjb> helma/modules/core/Array.js should no longer be defining indexof() and lastIndexOf()
[21:51] <rjb> since arrays already have those methods in rhino1.6
[21:52] <rjb> and they're not quite compatible (rhino's are slightly more general)
[22:32] <aiba> oooh, i want better logging also
[22:34] <aiba> my ideal log format would allow me to define a data structure that gets logged per-request/response, and then write code that fills it with whatever fields i'd like, such as client IP, whether an exception was thrown, what response code was given, and the total elapsed time.
[22:34] <aiba> and an optional array of info/warn/debug messages could be attached also
[22:34] <aiba> is there a way to implement something like this with helma?
[22:46] <rjb> i suppose there is
[22:46] <rjb> but i'm kinda lazy and was looking for a ready solution;)
[22:48] <rjb> http://helma.zumbrunn.net/reference/core/global.html#onResponse
[22:48] <rjb> http://helma.zumbrunn.net/reference/core/app.html#log
[22:49] <rjb> put those guys together and you can log whatever you like
[22:51] <rjb> what i was lookin for was some undocumented option to switch on logging in common log format
[22:52] <rjb> cause i imagined ppl must have wanted & needed it long ago
[22:55] <rjb> on another theme:
[22:56] <rjb> i wanted objects to have a method that returns an array of the object's indices (property names)
[22:57] <rjb> and another, that returns an array of the values
[22:59] <rjb> that seems easy to do in helma, because i have Object.dontEnum()
[23:00] <rjb> but things are not so good in rhino outside of helma..
[23:08] <midnightmonster> rjb, it can still be done in rhino-not-helma. just look at the code for dontEnum and copy?
[23:08] <midnightmonster> (Where "it" is the stuff with object introspection you wanted, not the logging)
[23:08] <rjb> dontEnum is implemented in java afaik?
[23:09] <midnightmonster> right, but if you're running on rhino you should be able to do the same kind of thing since you can access the underlying java engine
[23:10] <midnightmonster> it's only on spidermonkey you'd be sol
[23:11] <midnightmonster> steve yegge et al hacked their own less convenient version for their javascript rails clone
[23:11] <rjb> well yes i guess it would take hacking into the rhino jar?
[23:11] <midnightmonster> maybe, don't know
[23:12] <rjb> well don't know is my answer, too, thus the problem
[23:12] <midnightmonster> there's only one patch outstanding between rhino proper and helma rhino, and it's not dontenum, so I think you should not have to mess with rhino
[23:13] <midnightmonster> (though if your rhino is old, maybe you would)
[23:13] <rjb> oh well, as an alternative i can make suitable global functions that check the type of their argument
[23:13] <rjb> that's not hard at all, and i've basically done it
[23:14] <rjb> hehe my rhino is newer than helma's;)
[23:14] <rjb> but that's not the point
[23:15] <rjb> i believe the implementation is in helma.jar
[23:16] <rjb> and it's used in helma of course, but it's not available when you run java -jar rhino.jar
[23:16] <rjb> ie. the rhino shell
[23:23] <rjb> btw what is that outstanding patch?
[23:23] <midnightmonster> unrelated, have you heard of couchdb, and the latest(ish): http://jan.prima.de/~jan/plok/archives/89-CouchDb-updates.html
[23:24] <rjb> (as in: will i kill my helma if i swap its rhino.jar for a newer version?)
[23:24] <midnightmonster> grab the fourth down on http://zumbrunn.com/mochazone/ unless you're *Really* cutting edge on rhino
[23:25] <rjb> oh yeah i've seen that (couchdb stories)
[23:25] <midnightmonster> I mean, dang: I want some couchdb
[23:25] <rjb> Rhino 1.6 release 7 2007 08 19 here.
[23:26] <rjb> (a release, not stuff out of cvs)
[23:27] <zumbrunn> there is now a R7 based build with the helma patches in cvs
[23:27] <zumbrunn> http://adele.helma.org/source/viewcvs.cgi/helma/lib/rhino.jar?cvsroot=hop
[23:27] <midnightmonster> ah, chris has the goods
[23:28] <zumbrunn> I hope will soon do a 1.6.1 release
[23:28] <zumbrunn> (without packing to much stuff into it and delaying it to long)
[23:29] <midnightmonster> is there anything brewing in helma land besides rhino updates?
[23:29] <rjb> ah nice that
[23:30] <rjb> http://ejohn.org/blog/bringing-the-browser-to-the-server/ is cute as well
[23:31] <zumbrunn> things are probably brewing in everybodies heads right now
[23:31] <zumbrunn> but we haven't discussed these things yet
[23:32] <zumbrunn> that will happen on the mailing list and through proposals on the wiki
[23:32] <zumbrunn> but that will be for 1.7
[23:32] <midnightmonster> which "that" are you talking about chris?
[23:32] <zumbrunn> 1.6.1 should be just "quick" stuff and bugg fixes
[23:33] <midnightmonster> right. as is fitting for a point-point release
[23:33] <zumbrunn> the anything brewing thing
[23:33] <midnightmonster> ok
[23:35] <zumbrunn> rjb, regarding running helma directly using jetty, instead of behind apache...
[23:36] <zumbrunn> there are two issues... one that jetty has to run as root and the other ...I forgot...
[23:36] <zumbrunn> oh... that it can't do https
[23:38] <rjb> ok i see, access to port 80
[23:38] <zumbrunn> yep
[23:39] <rjb> jetty can't do https? doh
[23:39] <zumbrunn> actually, I think it could
[23:40] <zumbrunn> if you figure out how to get it working, I guess :-)
[23:40] <zumbrunn> this was discussed on the mailing list some time ago, if I remember correctly
[23:40] <rjb> well the root issue is pretty serious anyway
[23:41] <zumbrunn> well, if it runs in a jail, dunno
[23:42] <rjb> but i'm sure there must be a workaround for that, maybe some kind of port forwarding?
[23:42] <zumbrunn> yes, that would work
[23:43] <rjb> yeah a chroot jail wouldn't be too bad
[23:43] <rjb> otoh, there's not a big difference
[23:44] <rjb> between an exploit destroying the os on your dedicated helma server
[23:44] <rjb> and destroying just the jail helma was running in
[23:49] <rjb> on my machine right now a Caudium httpd is selectively forwarding connections incoming to port 80 to helma's 8080
[23:50] <rjb> but i don't think it would be hard to cook up a more lightweight solution
[23:55] <rjb> hmm in my event.log i'm finding stuff like
[23:55] <rjb> [ERROR] Couldn't parse file /home/rjb/Desktop/helma-1.6.0/modules/core/JSON.js
[23:56] <rjb> java.lang.NullPointerException
[23:56] <rjb> at helma.doc.DocFunction.newFunction(DocFunction.java:249)
[23:56] <rjb> .. and on it goes

 

 

In the channel now:

Logs by date: