Giter Club home page Giter Club logo

Comments (3)

nurettin avatar nurettin commented on August 26, 2024 1

I don't have access to a copy of Delphi anymore, but the logger wasn't meant for sending large chunks of data over UDP. That would require breaking down the data into 400-500 byte chunks and sending them consecutively.

Now This is just my personal opinion: Not really sure if this needs to be supported. There seems to be something wrong at the architectural level. You simply don't dump your entire mongodb document to a udp logging server. If you are forced by law, at least do it element by element instead of sending the entire array at once?

from loggerpro.

danieleteti avatar danieleteti commented on August 26, 2024

Can you provide a self-contained sample?

from loggerpro.

Basti-Fantasti avatar Basti-Fantasti commented on August 26, 2024

Sure :-)

I adjusted your 100_udp_syslog example from the samples folder (see attached zip file)
Basically I just commented out the random output of log messages and replaced it with a static function to load the dummy file (also attached), which needs to be copied to the same location as the compiled binary.

procedure TFUDPServerClientForm.UDPClientTimerTimer(Sender: TObject);
var
  SList : TStringlist;
begin
  slist := Tstringlist.Create;
  slist.LoadFromFile('.\dummy.json');
  Log.Debug(slist[0], 'DEBUG');
//  case RandomRange(0, 5) of
//    0: Log.Debug('debug message', 'DEBUG');
//    1: Log.Info('info message', 'INFO');
//    2: Log.Warn('warn message', 'WARN');
//    3: Log.Error('error message', 'ERROR');
//    4: Log.Info('Some Access Violation', 'INFO');
//  end;
  slist.Free;
end;

The Exception only pops up when debugging the application. When the application runs standalone, the message is never sent.
I don't know what would be the best/correct approach in that case. Split up the message? Send a warning with "message to long" or "message shortened" ?

dummy.json

UDPServerClientForm.zip

from loggerpro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.