Comments (5)
I have seen this offset sometimes as well, but never took a closer look. I attributed it to two instances of the application running in parallel and writing into the same log file (when the PID is not used in the file name). But @TikoTako 's log shows that it is obviously written from the same thread.
from loggerpro.
I deeply investigated the problem (I never seen it in years).The problem is the file name format which doesn't contain placeholders so output files are overlapped.
When you pass a filenameformate which doesn't contain placeholders, the filename is not deparated by TAG and all writers writes on the same file. The problem is that current code doesn't check this situation. I added the following check in constructor.
procedure TLoggerProFileAppenderBase.CheckLogFileNameFormat(
const FileNameFormat: String);
var
lExt: string;
begin
lExt := Format(FileNameFormat, ['X','Y','Z']);
if lExt = FileNameFormat then {means that FileNameFormat doesn't contain place holders }
begin
raise ELoggerPro.CreateFmt(
'FileName Format "%s" doesn''t contain required placeholders. [HINT: Just as an example, the DEFAULT_FILENAME_FORMAT is "%s"]',
[FileNameFormat, DEFAULT_FILENAME_FORMAT]);
end;
end;
Can you check if, using the repo version without your changes, it works?
If you don't want to have separate files by tag, just use TLoggerProSimpleFileAppender
.
from loggerpro.
Can you reproduce the error please?
from loggerpro.
Can you reproduce the error please?
Here:
https://github.com/TikoTako/loggerpro-test
from loggerpro.
With TLoggerProSimpleFileAppender and one file the order is correct, also is ok with TLoggerProFileAppender if it use different log files (one each unit)
from loggerpro.
Related Issues (20)
- Feature request: conditional compilation for depencencies HOT 1
- AddAppender raises AccessViolation and duplicates appenders HOT 2
- DelAppender - Argument Out Of Range Exception HOT 2
- Only one backup file ever used HOT 2
- Application Freeze on freelibrary with dll using LoggerPro HOT 1
- Feature Request for detail level HOT 1
- Enabling appenders feature request HOT 4
- Hi Microsoft AppCenter Support HOT 2
- Question: PID and log rotation? HOT 3
- A small XE4 compilation issue and a fix HOT 1
- why not fatal error level log? HOT 4
- Changes introduced in change request #103 produce an exception HOT 1
- Authentication on TElasticSearchAppender HOT 1
- Exception on Syslog Appender when message/payload is too big HOT 3
- [feature request] EMail Appender: Collective E-Mail HOT 1
- Please add the possibility to log to a TStringList.
- Log Rotate does nort work properly: why? HOT 6
- Database Appender HOT 2
- [Feature Request] A possibility to change the UTC Time of TLoggerProUDPSyslogAppender to local date and time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loggerpro.