Logging Conversations

what about *nix?

i mean bin

Do you mean a *nix binary? Sorry, not until this could be compiled with Mono…

I’'ve only got as far a scripting (Perl & PHP) on *nix.

Well - a mono assembly is not exactly what I associate with a unix binary (since it runs on MS .NET as well and is nothing native).

I’‘ve some experiences on *nix, so I’‘m not whining here… It’'s just that I tried (curiosity…) to compile the app with mono.

It’'s currently “in the pipeline” (Talking about

RichTextBox here). But the next problem would be,

that you are using the Codecentral approach of

inserting icons, right? With P/Invoke on

gdi/windows

dlls…

The RichEdit control that I’'m using has extended the

standard one by adding in functions to wrap up an

image in a Windows MetaFile (WMF) and inserting

directly into the control wrapped in RTF codes. If

you looked at one of the icons in this state you

would see the RTF control codes and the image

represented in Hex.

The way I’‘m using it is I’'ve created a class to

search for the emoticons using regexes then generate

the RTF codes required and replacing in the text of

the message. The message is then inserted into the

RichText control as standard RTF text.

If you are using the Codecentral version (http://www.codeproject.com/cs/miscctrl/csexrichtextbox.asp): That one uses Platform/Invoke and uses windows-only functions. Nothing wrong with that, but since it uses for example

[DllImportAttribute(“gdiplus.dll”)]

private static extern uint GdipEmfToWmfBits (IntPtr _hEmf,

uint _bufferSize, byte _buffer,

int _mappingMode, EmfToWmfBitsFlags _flags);

this won’'t ever work on mono on a non-windows system… Well - it would work, if you have the same function and can map the dll… But - GDI is quite windows-specific, I guess. So is this function…

As RTF is a well known standard, as soon as Mono sort

out the control, this should work (I think)

Yes, what ends up in the box is RTF and fine. The way it gets there is what I was talking about… But I may be wrong, of course. And it’'s seems a great tool anyway, independent of that “cosmetic” thing.

Well - a mono assembly is not exactly what I

associate with a unix binary (since it runs on MS

.NET as well and is nothing native).

What I meant was, Mono is the only way this particular app will most likely ever end up running on a *nix system. It’'s a long time since I played with c/c++. Pascal (whatever version), not sure.

If you are using the Codecentral version

(http://www.codeproject.com/cs/miscctrl/csexrichtextbo

x.asp): That one uses Platform/Invoke and uses

windows-only functions. Nothing wrong with that, but

since it uses for example

[DllImportAttribute(“gdiplus.dll”)]

private static extern uint GdipEmfToWmfBits (IntPtr

tr _hEmf,

uint _bufferSize, byte _buffer,

int _mappingMode, EmfToWmfBitsFlags _flags);

this won’'t ever work on mono on a non-windows

system… Well - it would work, if you have the same

function and can map the dll… But - GDI is quite

windows-specific, I guess. So is this function…

Just goes to show I didn’'t look closely at the code

edit

I wonder if a browser type component could be used instead?

Message was edited by:

jasonmcclean

Good idea… Well - mono would suggest Gecko I guess. Not sure what MS .NET offers there… I’'ll have a look at it this morning…

Jason,

Any interest in playing with desktop Java? It’‘s actually pretty great these days. It’'s fast and looks native. It would certainly fit well with JM itself…

-Matt

Jason,

Any interest in playing with desktop Java? It’'s

actually pretty great these days. It’'s fast and looks

native. It would certainly fit well with JM

itself…

Definitely an idea. I’'ve not really tried Java before, but I guess this could be the perfect opportunity to start

edit s/not really/never/

Message was edited by:

jasonmcclean

Just wanted to thank you all for your efforts in doing this work… especially the spiffy log reader!

Work has started on porting the log viewer to Java. Not as bad as I thought as C# is quite close syntactically (since java was a big influence). GUI will come last.

Any views as to whether this should still be a stand alone application, an applet or a messenger plugin (no idea how to tackle that one )?

Jason.

That’'s good news to hear. One thing that would be very interesting is indexing the logs using Lucene (http://lucene.apache.org/). That would let people do full-text searches to locate conversations.

As for the medium (app, applet, plugin). Eventually, we’'ll definitely need a robust tool inside the Jive Messenger admin console for viewing log information. However, there may definitely be a place for a desktop application as well. So, I would start where you want to and see where it goes.

-Matt

and i vote for a plugin first:)

I have Jive 2.1.5 running on a fresh install of Solaris 9. I was able to take the audit log from the Solaris box, ftp the log over to a Windows 2000 machine, run the binary that was posted and viewed the chats perfectly.

Works very well … unless you have 0 Windows machines at your location.

windows binary?? Do i’'ve missed something?

I’‘ve got Jive running on Linux, so I’'m just using a restricted Samba share to access the dated log files produced by the Perl script. No copying required.

LogViewer-bin.zip (55.1 K)

Would you be

interested in doing binary releases so that people

can more easily use the software?

Not a problem. As long as .NET v1.1 runtime is installed, there shouldn’'t be a problem.

Check the first page of posts … the one from Jason with the ZIP attached has an EXE file to view logs in a very easy to use format … I’'ve already busted a few people with it.

Hi!

I am trying to use the LogViewer, but in both scenarios (source and bin) I get the same error when i open the log file:

==========================================

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

  • Exception Text **************

System.NullReferenceException: Object reference not set to an instance of an object.

at Listawood.Xmpp.LogViewer.XmppLog.Add(XmlNode value) in c:\Documents and Settings\nromero\My Documents\SharpDevelop Projects\LogViewer\XmppLog.cs:line 55

at Listawood.Xmpp.LogViewer.MainForm.LoadFile(String fileName) in c:\Documents and Settings\nromero\My Documents\SharpDevelop Projects\LogViewer\MainForm.cs:line 413

at Listawood.Xmpp.LogViewer.MainForm.OpenLogFile() in c:\Documents and Settings\nromero\My Documents\SharpDevelop Projects\LogViewer\MainForm.cs:line 281

at Listawood.Xmpp.LogViewer.MainForm.MainToolBarButtonClick(Object sender, ToolBarButtonClickEventArgs e) in c:\Documents and Settings\nromero\My Documents\SharpDevelop Projects\LogViewer\MainForm.cs:line 235

at System.Windows.Forms.ToolBar.OnButtonClick(ToolBarButtonClickEventArgs e)

at System.Windows.Forms.ToolBar.WmReflectCommand(Message& m)

at System.Windows.Forms.ToolBar.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  • Loaded Assemblies **************

mscorlib

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.573

CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll


LogViewer

Assembly Version: 1.0.2020.24043

Win32 Version: 1.0.2020.24043

CodeBase: file:///C:/Documents%20and%20Settings/nromero/My%20Documents/SharpDevelop%20Pro jects/LogViewer/bin/Debug/LogViewer.exe


System.Windows.Forms

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.573

CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e0 89/system.windows.forms.dll


System

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.573

CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll


System.Drawing

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.573

CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/sys tem.drawing.dll


System.Xml

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.573

CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system. xml.dll


  • JIT Debugging **************

To enable just in time (JIT) debugging, the config file for this

application or machine (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the machine

rather than being handled by this dialog.

=================================================

What am I missing?

thanks!

I’'m guessing that there is a problem with the XML, so the XML classes are not happy. Are you accessing the raw log file or using the Perl script to extract specific dates from the raw log file, then accessing the file that the Perl script creates?

If it is the raw log file, then maybe the bit of code I shoved in to add the missing tag isn’‘t working. I’'ll have a play about tomorrow and get back to you. Unfortunately no time at the moment.

Jason.

Nope, it’'s not that. Just taken a file and removed the tag from it and everything still worked. opened the file up in notepad after and the was back again, so that is definitely working.

Hmm, if you are using the raw log file, do you have write access to it?

edit

Unfortunately, as I just threw this together for internal use I didn’'t put in a lot of error checking code - darn, remember that next time I release code on the unsuspecting world.

Message was edited by:

jasonmcclean

Thanks for your fast response. In fact I’‘m using the raw data… first I thought I had to add to the copy I made…but since i got errors i tried without it as well and same result. Permissions are okey… though now that i thing I might have been trying when the audit-file was still opened (editor)… Now I can’'t check that … but I will do first thing 2morrow morning…

Any other suggestion please tell me!

I will also try to use the perl script to see if that makes a different.