pointonsoftware / pscore

C++ library for building your business software
GNU Affero General Public License v3.0
1 stars 2 forks source link

Logger doesn't properly capture the class and function name #68

Closed gbenziv closed 3 years ago

gbenziv commented 4 years ago

The module, class and function names in the logger is inconsistent with its planned design to log the class and function name:

[2020-10-02 20:03:11.056] | std                  | string domain::login::LoginController::loginWithPIN | -- User with PIN 1111 was not found
[2020-10-02 20:03:14.504] | domain               | login::LoginController::isPinValid | -- Invalid PIN: aaaa
PIN is invalid, please try again.
gbenziv commented 4 years ago

Correct format is:

[time] | namespace::class name | function name | log line

e.g.


[2020-10-02 20:03:11.056] | domain::login::LoginController | loginWithPIN | -- User with PIN 1111 was not found
gbenziv commented 3 years ago

The log must be truncated if there is space in the log string. Space indicates that the first string is a return type and should be discarded.

e.g. [2020-12-11 22:01:22.397] | domain | login::AUTHSTATUS domain::login::LoginController::getUser | -- Retrieving user data

must be fixed as [2020-12-11 22:01:22.397] | domain::login::LoginController | getUser | -- Retrieving user data

gbenziv commented 3 years ago

Remove template arguments. For example:

from:

BaseController<DpType, ViewType, EntityType>::dumpValidationResult

to:


BaseController::dumpValidationResult