Skip to content

Conversation

@Pietfried
Copy link
Contributor

Added option for writing SecurityEvents to a security log file for ocpp1.6 and ocpp2.0.1.
This can be enabled by adding "security" to LogMessagesFormat configuration parameter.

…pp1.6 and ocpp2.0.1

Signed-off-by: pietfried <pietgoempel@gmail.com>
@Pietfried Pietfried force-pushed the feature/security-log-file branch from 4817df3 to 9a15914 Compare January 18, 2024 15:41
@Pietfried Pietfried requested a review from hikinggrass January 18, 2024 16:30
@Pietfried Pietfried merged commit 7fa3cb9 into main Jan 18, 2024
@Pietfried Pietfried deleted the feature/security-log-file branch January 18, 2024 16:30
}
if (this->log_security) {
EVLOG_info << "Logging SecurityEvents to file";
this->security_log_file.open(message_log_path + "/" + output_file_name + ".security.log");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see this overwrites the old already existing security log as it does not append?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is the output_file_name different for each run?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 1.6 (and 2.0.1) the output_file_name is set to the current datetime:

this->logging = std::make_shared<ocpp::MessageLogging>(

So it's very likely different for each run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants