Code Monkey home page Code Monkey logo

jachlogmgr's People

Contributors

jachguate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jachlogmgr's Issues

The log to disk loses exactly one character when the data has no spaces and the remaining of the line is just one character greater than the maximum line length

The log to disk loses exactly one character when the data has no spaces and the remaining of the line is just one character greater than the maximum line length of the disk writer.

Take this example:

  DiskLogger.MaxLineSize := 39;
  jachLog.LogInfo(' 40 1234567890123456789012345678901234567890');
  jachLog.LogInfo('1234567890123456789012345678901234567890');
  jachLog.LogInfo(' 41 12345678901234567890123456789012345678901');
  jachLog.LogInfo('12345678901234567890123456789012345678901');
  jachLog.LogInfo(' 50 1234567890123456789012345678901234567890');
  jachLog.LogInfo('12345678901234567890123456789012345678901234567890');

The resulting log is:

2023-02-27 14:19:38:616 00000D00 Info   40
                                       123456789012345678901234567890123456789
2023-02-27 14:19:38:616 00000D00 Info  123456789012345678901234567890123456789
2023-02-27 14:19:38:616 00000D00 Info   41
                                       123456789012345678901234567890123456789
                                       01
2023-02-27 14:19:38:616 00000D00 Info  123456789012345678901234567890123456789
                                       01
2023-02-27 14:19:38:632 00000D00 Info   50
                                       123456789012345678901234567890123456789
                                       01234567890
2023-02-27 14:19:38:632 00000D00 Info  123456789012345678901234567890123456789
                                       01234567890

The messages including exactly 40 consecutive chars in the message lost the last '0' char. All other messages are correct.

Add debug level filtering at log topic level to the Log class

Actually the debug level filter is global and applies to all log topics, but there are sometimes that you want to enable debug messages at different debug levels for different topics.

This filtering will affect at a log instance level, affecting all log destinations (writers).

MegaDemo: The demo main form is leaking memory

Some of the internal objects created during startup are not freed before the application closes, this includes:

  • registration of available/created writers
  • the list of threads for continuous log generation that are active (the threads are being freed correctly, but the list itself is leaked at the end).

Add support to have IsCached and UseSeparateThreadToWrite properties set to True at the same time

Actually, if both are set to true, the cache mechanism doesn't work, but the messages are directly written using the auxiliary trheads.

When WriteCachedLog is called, the CACHED LOG BEGIN/END messages are written in the context of the calling thread and not using the writer's own threads.

When both are set to true, the messages have to be cached and when WriteCachedLog is called the threads created for that purpose have to do the actual work.

FMXMemo writer: CachedLogWrite Begin/End messages appear together

When the log is cached, a TjachLogToFMXMemo writer is registered and a call to WriteCachedLog is executed, the memo shows the Cached LOG Write BEGIN and END messages together, followed by all the cached messages.

The expected behavior is to show the BEGIN message, then all the cached messages and the END message afterwards.

A example log shows like this:

2022-03-29 00:22:49:554 00002DBC Info  Cached LOG Write BEGIN ********************
2022-03-29 00:22:49:554 00002DBC Info  Cached LOG Write END **********************
2022-03-28 00:22:48:266 00002DBC Info  [General]Message No. 1
2022-03-28 00:22:48:266 00002DBC Info  [General]Message No. 2
2022-03-28 00:22:48:266 00002DBC Info  [General]Message No. 3
...etc

Give versions with less flexibility for the topics feature

There are some applications where you need less flexibility to the library.

One is the simple application that doesn't require the topics feature at all.

Other is the application that will always require a topic and you don't want to allow a developer to call the Log functions without defining an explicit topic.

In the middle are the applications that can use and manage both approaches.

Add debug level filtering at log topic level to the base Writer class

Actually the debug level filter is global and applies to all log topics, but there are sometimes that you want to enable debug messages at different debug levels for different topics for a specific destination (writer).

This filtering will affect at a destination level, affecting only the messages processed by the specific writer instance.

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.