Skip to content

Conversation

@atarekra
Copy link
Contributor

This pull request introduces a new feature for managing log file sizes to prevent them from growing indefinitely and consuming excessive disk space. A log file size policy has been implemented to control the maximum size of log files and to handle log rotation.

The following new settings are available in the logging.json configuration file under the logFileSizePolicy object:

  • enabled: A boolean to enable or disable the feature.
  • maxFileSizeInBytes: The maximum size a log file can reach before rotation is triggered.
  • numberOfFiles: The number of log files to keep in rotation.
  • overwriteExistingFiles: A boolean to determine if existing log files should be overwritten.
  • truncateOnRotation: A boolean to specify whether the log file should be truncated when rotation occurs.

When this policy is enabled, the logger will check the current file size before writing a new message. If the new message causes the file to exceed maxFileSizeInBytes, a log rotation is performed

References

#34

Demonstration diagram for the functionality
logfilesize diagram

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

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.

1 participant