IRC Log Viewer » #firebreath » 2011-08-12

IRC Nick Time (GMT-7) Message
nomuna 07:08 Hi folks. I have a question regarding the log4cplus firebreath uses. I have included the library as a dependency in my plugin since I need some debugging to do. Can anyone tell me how I configure/use it. I builds log4cplus for my plugin but when I include the header files it doesn't find them. Thanks in advance.
linearray 07:08 did you see the logging wiki page?
nomuna 07:08 Mmm... No.
linearray 07:08 !wiki logging
FireBreathBot 07:08 8 results found. Note: Results limited to 8
"struct FB AsyncLogRequest":
"struct FB AsyncLogRequest Members":
"Live Chat":
"Documentation To-Do":
"Getting Help":
nomuna 07:08 Looks like you are using some bad ass VI plugin to search in the wiki sites. Can I have the name of it. :D
Or is it a shell script you are using...
linearray 07:08 hmm, this is a 'phenny' bot
with some extensions
nomuna 07:08 OK. My mistake...
nomuna 08:08 I see that there's a console logger. Where does it go? I am using linux.
linearray 08:08 stderr or stdout, can't remember
but I think it's stdout
nomuna 08:08 I mean... In the wiki they say that the stdout (to which the console appender wrties) gets redirected to  /var/log/system.log. Does it do that on Linux too?
linearray 08:08 I think that depends on your flavor of linux desktop
when you start e.g. firefox from a terminal, it will print to the terminal
no idea what happens when you start it from gnome or KDE
nomuna 08:08 I followed the logging information on the wiki and added a file appender. it is supposed to write to /tmp/plugin.log. I don't see anything there.... I mean the file is not even created. But I see the stdio output if I start firefox from the commandline, like you said. I am using FBLOG_INFO("methodname()", "Some message"). Do I have to pass the appender as a parameter?
So that it writes to the file?
linearray 08:08 try touching the file
nomuna 08:08 nothing to touch... :D You mean create a new file by 'touch malogfile.log'?.
linearray 08:08 yes
nomuna 08:08 Wait... Need to recompile and deploy...
nomuna 08:08 File remains empty... logging to STDOUT is working.
linearray 08:08 I remember I had the same problem
and it was something trivial :)
nomuna 08:08 Well I guess I should be happy that at least I can write to the console. :D
linearray 08:08 either permissions, or file did not exist, etc.
nomuna 08:08 Any user/process can write to and create files in /tmp/ I think..
linearray 08:08 yeah
nomuna 08:08 Now I see some error message in the console output:
log4cplus:ERROR Unable to open file:
But I don't see the name of the file...
it is trying to open...
reviny 08:08 hi all, how i can parse json string into FB::JSObjectPtr... i see src/libs/jsoncpp library inside and tried to use it but linking have failed, so cpp files aren't compiled? is this library used? i can add cpp files of jsoncpp to my project, but is this right way? and FB::JSObjectPtr looks more nice
taxilian 09:08 g'morning all
linearray 09:08 hi
taxilian 09:08 nomuma: what version of FireBreath are you using?
nomuna 09:08 taxilian: Let me check.
taxilian 09:08 1.5? 1.6?
nomuna 09:08 1.3 (git hash 6c5982038b9606590852c40df0026e7fd795945e )
FireBreathBot 09:08 6c59820 by Richard Bateman: FIREBREATH-13 Changed invalidate to async cross-thread call
taxilian 09:08 nomuna: upgrade
I don't support anything that old
nomuna 09:08 You mean because of the logging issue?
taxilian 09:08 I mean because all around there are about a zillion bugfixes, memory leak fixes, and overall fixes since then
and because regardless of what issues you're having I'm not going to help you if you're on that old of a version because chances are very good your problem has been fixes
nomuna 09:08 Ok. next week i am going on vacation before that I wanted to leave a working logging with the plugin. The framework is used in our project as a submodule and we set the hash to the one you saw. I will upgrade after I am back. If you could tell me why the logging is not working as described in the wiki I would be really happy. :D
linearray 09:08 lol
nomuna 09:08 OK. I understand you... I will see if I can build the plugin with the update.
taxilian 09:08 there are some breaking changes since 1.3
it's all on the version history page
nomuna 09:08 Damn...
taxilian 09:08 it's pretty easy if you do it one version at a time, but since you're so far behind it might be a bit of a pain
that's one reason I recommend you upgrade sooner
reviny 09:08 hi again ^) what about my question // how i can parse json string into FB::JSObjectPtr... i see src/libs/jsoncpp library inside and tried to use it but linking have failed, so cpp files aren't compiled? is this library used? i can add cpp files of jsoncpp to my project, but is this right way? and FB::JSObjectPtr looks more nice
taxilian 09:08 reviny: hang on, I'm on the phone
reviny 09:08 oh, sorry :)
taxilian 09:08 no worries. okay, I'm back
what are you actually trying to do?
reviny: FB::JSObjectPtr is not a regular container type, it's a wrapper for an actual javascript object
reviny 09:08 my plugin got json in std::string (not from browser actually) and i to access it as JSObject
see... so i have to use jsoncpp&
taxilian 09:08 that would be, in a word, foolish
you want it as a FB::variant
not as a JSObject
unless for some reason you need to return the whole thing to javascript, in which case there are much better options
reviny 09:08 hm... i misunderstand... how i can transform json string into FB::variant?
taxilian 09:08 to do that, you need to use jsoncpp =]
in your PluginConfig.cmake at the bottom, put: add_firebreath_library(jsoncpp)
and voila, you have jsoncpp =]
well, rerun the prep script of course
reviny 10:08 aha! thanks :)
i've used jsoncpp earlier and don't expect fbjson.h there... only now noticed it :) thank a lot :)
taxilian 10:08 I think it's new in 1.6
and undocumented so far =]
feel free to document it
be back in a bit; going to eat breakfast and switch computers
amackera 15:08 Any of you guys use DMG installers for your plugins on Mac?
taxilian 15:08 DMG is a container, not an installer
what are you looking to do?
amackera 15:08 Deploy my plugin in a DMG, similar to other mac deployments i've seen
taxilian 15:08 there are a few ways you could do it
amackera 15:08 I am having trouble installing to the user's Internet Plug-Ins/ folder
taxilian 15:08 first of all, a DMG is a disk image, not an installer
so are you trying to use a PKG or what?
amackera 15:08 We've used a DMG up until now
taxilian 15:08 dude; a DMG is not an installer
so what did you put inside the DMG
amackera 15:08 lol
taxilian 15:08 it's just a disk image
amackera 15:08 plugin bundle, alias to the /Library/Internet\ Plug-Ins folder, and a background image that explains what to do
(drag bundle into Internet Plug-Ins)
taxilian 15:08 ahh
amackera 15:08 It works, but as of Mac OS X 10.7 requires the user to authenticate
taxilian 15:08 that won't work well for upgrades
say what??
that's bizarre
amackera 15:08 i think 10.7 changes the default permissions of the folder
it also broke our java applet which doesn't have permissions in that directory
taxilian 15:08 hmm. if that's the case, then you'll have that problem no matter what you use
hmm. on mine the permissions haven't changed, though
amackera 15:08 it definitely requires authentication on both office computers with 10.7
they may be the exceptions
it highlighted a failure of our deployment process though (permissions issues cause failure)
So my solution was to install it per user, in the ~/Library/Internet\ Plug-Ins/ folder
linearray 15:08 can you paste the permissions on /Library/Internet Plugins ?
on 10.6 it's drwxrwxr-x 11 root admin
amackera 15:08 drwxr-xr-x 11 root wheel 374B 12 Aug 17:00
taxilian 15:08 drwx------+ 9 richard staff 306B Aug 11 13:25
that's on my 10.7 box
oh, wait
/Library/Internet Plugins?
of course that's root
are you actually trying to install there?
that's a bad idea
and of course would require elevation
linearray 15:08 it works on my machine
taxilian 15:08 ~/Library/Internet Plugins is where you usually should be installing
amackera 15:08 taxilian: that's right, that's what i have settled on now
the tricky thing is to get a DMG template with a link to the right place
taxilian 15:08 so use an installer
amackera 15:08 ehhh i guess
so clunky :S
taxilian 15:08 but yeah, you'll have to authenticate to install to the machine-wide one
and they'll need admin rights for it to work
amackera 15:08 yea
taxilian 15:08 GradeCam uses an applescript installer that is actaully pretty elegant
linearray 15:08 hmm, you can use applescript to create an alias in the dmg
amackera 15:08 linearray: not bad, that's a possibility
pretty clunky in its own right though :P
linearray 15:08 yeah, it's a nice hack
amackera 16:08 Ah, so can't use AppleScript to alter the alias since the DMG is read-only
Thought I could write an AppleScript that invokes a shell script when user drags a file over it, but it doesn't seem to work when it's in a DMG
so I think I'm going to use a true installer
taxilian 16:08 amackera: what about using applescript to create an alias at /tmp/PluginDir or some such and then put the alias to that fixed path in your dmg
amackera 16:08 oo, that's not a bad idea
i'm not quite sure how to get the AppleScript to execute when the user mounts the DMG either
linearray 16:08 there was something on stackoverflow
am mobile now, cant check
amackera 17:08 I think a package installer is the way to go
PackageMaker in 10.7 is quite good
ubi_psaii 20:08 hi there
got a question, if some experts are available in here ;)
I'll try later and check the forum ;)