IRC Log Viewer » #firebreath » 2013-12-19

IRC Nick Time (GMT-7) Message
mik141 09:12 hi i have a problem with getting browser type when setting log file in firebreath, i was asking for help yesterday but no one could help - maybe now someone could help me with this?
taxilian 09:12 …I don't see any messages from you yesterday
maybe there was a netsplit?
mik141 09:12 http://logs.firebreath.org/irc_channels/1/log_files/1200 - at 10:12
http://logs.firebreath.org/irc_channels/1/log_files/1200 - at 10:12
reichi 09:12 (06:02:45 PM) mik141: hi, i'm wondering is it possible to get browser type (IE, Firefox, Chrom) when the method getLoggingMethods(...) is called?
(06:02:45 PM) mik141: hi, i'm wondering is it possible to get browser type (IE, Firefox, Chrom) when the method getLoggingMethods(...) is called?
(06:03:07 PM) mik141: i want to make different locations for different webbrowsers
(06:03:28 PM) mik141: i mean different log files locations
(06:03:07 PM) mik141: i want to make different locations for different webbrowsers
(06:03:28 PM) mik141: i mean different log files locations
ah :)
( i thought repeating 3 lines is ok)
mik141 09:12 yep that's it
yep that's it
so is it possible to do so?
taxilian 09:12 weird. that's not in my logs anywhere
anyway, the only way you could do that would be to get the useragent and parse it
mik141 09:12 ok, but how to get useragent in factory when plugin is not created yet?
taxilian 09:12 don't think you can
let me think
mik141 09:12 ok
ok
taxilian 09:12 so you can get it early on, but I'm not sure if it's exposed anywhere useful to you
mik141 09:12 so what would you suggest me to do?
because as i can see - the factory init is done before plugin init
no am i right that there is no way to get pointer to host/window etc?
taxilian 09:12 that is correct
if it's important you'll probably need to dig through firebreath code and find a reasonable way to add it. You could probably add a static method somewhere to get the useragent
mik141 09:12 ok i will check a few solutions.
and another question - what if there is only one log file and i have multiple browsers opened so multiple plugin instances are enabled. so how log will behave?
because now as i noticed there will be only one browser "connected" to this log file
taxilian 09:12 mik141: I usually put the pid in the filename to avoid that problem
mik141 09:12 yea i know, but is there any solution that log file could be appended by many instances at one time?
taxilian 10:12 I honestly don't know
well
well
yes
yes
there definitely is
there definitely is
but I don't know if you can make log4cplus do that or not
you might have to implement your own custom logger
which sin't that hard, incidentally
reichi 10:12 non exclusive write access should pretty much do it, shouldn't it?