Welcome, Guest
Username: Password: Remember me
General Purpose Components and Libraries, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

May you please add MultiLog to CT? 11 years 10 months ago #2104

  • Aleksandar
  • Aleksandar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31
MultiLog is well known logging package for Lazarus, so it would be good to have it as standard package in CT.

When I tried to install it on my 64bit Linux I got some errors in multilog.pas. Error was Illegal type conversion: "LongInt" to "TObject".

One of methods with that error was TLogger.DecCounter

It was enough to change j: Ingeter; to j: PtrInt; in var section of those methods, to make it work.

There were also two properties in logtreeview.pas Ctl3D and ParentCtl3D that I had to comment out.

Last change was to comment out clEndColors : Result:='clEndColors'; in multiloglcl.pas

As you can see, only few things should be changed (less then 2 minutes of work) in order to make it work in both 64 and 32bit Lazarus. It should also work in both Linux and Windows, but I didn't had time to test in Windows.

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2106

  • Chris
  • Chris's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 4
Hi viking

is this the MultiLogger that's on the Luipack googlecode site here?

code.google.com/p/luipack/wiki/MultiLog

it looks like the viewers for this have a number of dependencies, one of which is a component to prevent multiple instances of an application called "uniqueinstance" which I've been looking at (unless anyone knows some simple code that could be used instead) - "uniqueinstance" seems to work ok (at least in Win32), I don't have access to any 64 bit systems currently so can't try it there but am certainly interested if it has proved useful to other developers and this component is also included. There's a hex file viewer too which might be useful to some.

Are there conflicts with existing CT packages for Luiz's version of the Virtual Treeview dependency (or are they completely separate libraries)?

TheBlackSheep

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2108

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4511
  • Thank you received: 1101
Guys
we will test/check these components

Until now Lab CodeTyphon Changes:

-NEW: Auto build Lazarus DataDesktop tool
-ADD: lazdatadict
-ADD: pl_SpkToolBar with some CodeOcean Samples (some problems with Linux 64bit)
-ADD: pl_LazSolutions with some CodeOcean Samples
-ADD: pl_LazWebSolutions with some CodeOcean Samples

screens soon...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2109

  • Aleksandar
  • Aleksandar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

TheBlackSheep wrote: Hi viking
is this the MultiLogger that's on the Luipack googlecode site here?
code.google.com/p/luipack/wiki/MultiLog


Yes, that's the one, but downloaded from here
luipack.bountysource.com/downloads

TheBlackSheep wrote: it looks like the viewers for this have a number of dependencies, one of which is a component to prevent multiple instances of an application called "uniqueinstance" which I've been looking at (unless anyone knows some simple code that could be used instead) - "uniqueinstance" seems to work ok (at least in Win32), I don't have access to any 64 bit systems currently so can't try it there but am certainly interested if it has proved useful to other developers and this component is also included. There's a hex file viewer too which might be useful to some.
Are there conflicts with existing CT packages for Luiz's version of the Virtual Treeview dependency (or are they completely separate libraries)?


We need to clear something here. I was talking about the mulutilog package only. It use only TCustomTreeView, not Virtual Treeview.

You also have simpleipcviewer app (very basic viewer) and you do not need any additional package to make that work.

I didn't had time to try to compile advanced advanced viewer, that need some additional packages, since I needed file logging only (for console app that is used in linux cron job).

I think that you can use existing Virutal Treeview included in CT. I would not try to install any other one, since I am suspected that they are same (or almost same) and I think that doing that will make conflicts.

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2110

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4511
  • Thank you received: 1101
First MultiLog test
please try and report here
PilotLogic Architect and Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2111

  • Chris
  • Chris's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 4
I've downloaded a demo from Luiz's googlecode website and modded it to work with the pl_ExSystem and CT/Lazarus - seems to work fine - this Multilog component does look quite useful (still need to get my head around it, there's a lot in here).

I've also created a "pl_" version of the uniqueinstance component (attached) - it registers on the System tab by default (not sure if this needs changing) - it needs testing in Linux.

TheBlackSheep

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2112

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4511
  • Thank you received: 1101
Thanks Sir
I will test this
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2113

  • Aleksandar
  • Aleksandar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

TheBlackSheep wrote: I've also created a "pl_" version of the uniqueinstance component (attached) - it registers on the System tab by default (not sure if this needs changing) - it needs testing in Linux.


I just had a quick look.

This looks promising:
{$ifdef unix}
uses
  BaseUnix;

Looks like uniqueinstance should work fine in Linux. I will try to find some time to test it.

In order to compile advanced multilogviewer, you will need some more libraries.

virtualtreeview was already part of CT and multilog is just added to pl_ExSystem. You prepared the uniqueinstance.

The last missing pieces are luicontrols and atbinhex.

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2117

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4511
  • Thank you received: 1101
We give the final solution with
the new pl_luicontrols package (pl_LuiControls.zip)
ALL-IN-ONE

and some samples (LuiControls.zip)

please test/modify and report
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2125

  • Aleksandar
  • Aleksandar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

sternas wrote: We give the final solution with
the new pl_luicontrols package (pl_LuiControls.zip)
ALL-IN-ONE

and some samples (LuiControls.zip)

please test/modify and report


I have installed this package without any problem in CT 2.70 on Mandriva x64. I do not have time to test demos now, but I will try later.

I also noticed that only 3 components have icons in IDE.

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2126

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4511
  • Thank you received: 1101
Yes
we must put new icons
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2128

  • Chris
  • Chris's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 4
these do? Some might need some work still but I imagine they'll do for the minute rather than the stock Lazarus icon.

all the demo's seem to work fine except the data-aware one - looks like the LuiPack components will work it's just an issue with the DBF component (for me at least).

Might be worth asking Luiz' if he has any examples for the others - he seems to be concentrating on JSON stuff (using JSON as a datasource by the looks of things) looking at his recent updates on his googlecode site.

TheBlackSheep

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2129

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4511
  • Thank you received: 1101
Thanks Sir
.

PilotLogic Architect and Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2130

  • Luiz
  • Luiz's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
I am pleased by you looking at LuiControls, but i must warn you that they are being reworked and some code may broke after that, so i would wait until the next release. The same for LuiDialogs, LuiCairo, LuiConfig, VTJSON

UniqueInstance and Multilog are ok since the interface wont change radically

The official repo is code.google.com/p/luipack/

BTW: nice icons, may i use some of them?

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2131

  • Chris
  • Chris's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 4
hi blukblum

please use as you wish - they're mainly just composites from free icons edited with GIMP. If there are any you don't like just let me know what you had in mind instead and I'll try and amend them appropriately - I've always struggled in trying to find or make a 24x24 pixel graphic convey the meaning for a component and I fear I may not have done the code/representation justice.

TheBlackSheep

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2140

  • Aleksandar
  • Aleksandar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

sternas wrote: We give the final solution with
the new pl_luicontrols package (pl_LuiControls.zip)
ALL-IN-ONE


I finally found some time to test this package.

I recompiled my project and it is was 4.5MB bigger then it was with log part only.

Then I noticed that I have pl_luicontrols added. I guess that happened automatically when I changed required package (removed old one and added new one).

When I removed pl_luicontrols unit from uses, file size is almost same as it was before (maybe even smaller).

I am very experienced Delphi developer, but very new to Lazarus development. I guess I need some time to figure how all things works in this new world. :)

Please Log in or Create an account to join the conversation.

Last edit: by Aleksandar.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2141

  • Chris
  • Chris's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 4
hi viking

try stripping your project...on the Tools menu of CodeTyphon, at the top of the tree is the Strip tool, run that and locate your exe (via the Add button) and then click the "Do Strip" button - this will remove anything that's unnecessary from the exe (mainly debug and resources stuff that are unused and not required when you "ship" your program).

there are a few articles in the Lazarus wiki about this - see here for one of them;

wiki.lazarus.freepascal.org/File_size_and_smartlinking

TheBlackSheep

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2142

  • Aleksandar
  • Aleksandar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

TheBlackSheep wrote: hi viking

try stripping your project...on the Tools menu of CodeTyphon, at the top of the tree is the Strip tool, run that and locate your exe (via the Add button) and then click the "Do Strip" button - this will remove anything that's unnecessary from the exe (mainly debug and resources stuff that are unused and not required when you "ship" your program).

there are a few articles in the Lazarus wiki about this - see here for one of them;

wiki.lazarus.freepascal.org/File_size_and_smartlinking

TheBlackSheep


Thanks, but I think you misunderstood me. I know what is strip, but I do not need to use it, since I do not generate debug info for release. :)

In the Build Modes tab I have made new Build Mode and name it Release. In this profile I have Generate debugging info unchecked, strip symbols is checked and Link smart is checked.

So, I activate this profile when compiling for release and my executables are small. :)

My problem was something else.

When I made my project I added those units as last two in uses:

SharedLogger, filechannel;

Since it is console app I added them in lpr (because I do not have main unit as in GUI app).

When I compile it with Release profile executable was about 500kb.

That was before sternas started to port lui controls.

When he posted pl_luicontrols package I removed my package and installed pl_luicontrols, but haven't had time to test it.

When I found some time to test it, I opened my project.

In Project Insprector I removed my package from Required Packages, and added pl_luicontrols package there.

I recompiled my project with same build profile as before (Release) but this time executable was 5Mb.

Then I noticed that I have this in my project in uses
SharedLogger, filechannel, pl_luicontrols;

Somehow pl_luicontrols was added in uses. And that is the thing that confuses me. How it appears there? How pl_luicontrols appeared in uses?

When I removed it from there. My exe had almost same size as before about 500kb.

Please Log in or Create an account to join the conversation.

Re: May you please add MultiLog to CT? 11 years 10 months ago #2143

  • Chris
  • Chris's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 4
apologies - I obviously wouldn't want to "teach grandmother how to suck eggs" - it's an English expression see here;

en.wikipedia.org/wiki/Teaching_grandmother_to_suck_eggs

does that mean it makes more sense to split these components up into separate packages if you're not going to be using certain parts (say, only the "uniqueinstance" component)? or you'd just need to remember (before the final compilation) to remove any of the unused units from the uses clause that might get added inadvertently? Are there any messages in the messages window hinting this?

I seem to remember there were some utilities (possibly free) in Delphi to do some analaysis on used/un-used units...

TheBlackSheep

Please Log in or Create an account to join the conversation.

  • Page:
  • 1