dlr-gtlab / gt-logging

Basic C++14 logging library based on QsLog
0 stars 0 forks source link

Resolve "Add an ID to the logging output" - [merged] #90

Closed rainman110 closed 10 months ago

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 16, 2022, 15:12

Merges 28-add-an-id-to-the-logging-output -> master

This MR implements the ability to log an additional identificiation string. One may define GT_MODULE_ID globally at compile to provide a logging ident otherwise nothing will be logged.

Additionally I added gtTraceId, gtDebugId etc. macros for logging a custom ID.

It also fixed a bug in the GT_LOG_LINE_NUMBERS define due to which it was not possible to call methods on the QDebug stream (e.g. gtDebug().nospace()) when the define was set.

Closes #28

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 16, 2022, 15:34

added 1 commit

Compare with previous version

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 19, 2022, 11:11

Example output in GTlab:

grafik

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 19, 2022, 11:30

Example output if GT_LOG_LINE_NUMBERS has been defined:

grafik

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 19, 2022, 11:42

added 1 commit

Compare with previous version

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 19, 2022, 11:50

marked this merge request as ready

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 19, 2022, 11:53

Commented on src/QsLog.h line 79

Log nothing if id was not set:

            , buffer{id.isEmpty() ? QString{}:
                                    QChar{'['} + std::move(id) + QString{"] "}}
rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 19, 2022, 12:00

Commented on src/QsLog.h line 42

Abort compilation if QS_LOGGING_ID was not set:

#error QS_LOGGING_ID must be defined globally when using QsLog. \
       Please define the macro using -DQS_LOGGING_ID =<logging_id>

Will show as:

grafik

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 10:52

Commented on src/QsLog.h line 79

changed this line in version 4 of the diff

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 10:52

Commented on src/QsLog.h line 42

changed this line in version 4 of the diff

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 10:52

added 1 commit

Compare with previous version

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 10:55

added 1 commit

Compare with previous version

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 10:57

Commented on src/QsLog.h line 79

applied in a separate commit

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 10:57

Commented on src/QsLog.h line 42

applied in a separate commit

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 10:57

resolved all threads

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 11:00

added 1 commit

Compare with previous version

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 20, 2022, 11:16

added 1 commit

Compare with previous version

rainman110 commented 2 years ago

In GitLab by @mariusalexander on Sep 23, 2022, 14:58

mentioned in merge request gtlab-coredev/gtlab!210

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Sep 26, 2022, 12:15

added 9 commits

Compare with previous version

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Sep 27, 2022, 08:02

requested review from @jensschmeink and @rainman110

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Sep 30, 2022, 09:27

added 10 commits

Compare with previous version

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Oct 4, 2022, 12:11

Commented on src/QsLog.h line 77

                        QString id = GT_LOG_TO_STR(GT_MODULE_ID)) :
rainman110 commented 1 year ago

In GitLab by @mariusalexander on Oct 4, 2022, 12:11

resolved all threads

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Oct 4, 2022, 12:11

Commented on src/QsLog.h line 77

changed this line in version 10 of the diff

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Oct 4, 2022, 12:11

added 1 commit

Compare with previous version

rainman110 commented 1 year ago

In GitLab by @jensschmeink on Oct 10, 2022, 12:32

approved this merge request

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Oct 10, 2022, 14:18

mentioned in commit 3d4881c07da46c0003434ec0fee7f0e6dc500169