mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1449] [MERGED] Added logfile option for non-syslog logging #1995
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#1995
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1449
Author: @ggtakec
Created: 10/13/2020
Status: ✅ Merged
Merged: 10/19/2020
Merged by: @gaul
Base:
master← Head:add_logfile📝 Commits (1)
c37a707Added logfile option for non-syslog logging📊 Changes
11 files changed (+426 additions, -136 deletions)
View changed files
📝
doc/man/s3fs.1(+5 -0)📝
src/Makefile.am(+1 -1)📝
src/addhead.cpp(+1 -1)📝
src/curl.cpp(+1 -1)📝
src/s3fs.cpp(+24 -16)📝
src/s3fs_help.cpp(+9 -0)📝
src/s3fs_logger.cpp(+197 -3)📝
src/s3fs_logger.h(+164 -91)📝
src/sighandlers.cpp(+19 -19)📝
src/sighandlers.h(+3 -3)📝
src/test_string_util.cpp(+2 -1)📄 Description
Relevant Issue (if applicable)
#1444
Details
Enabled to switch the log output to the specified file instead of syslog and stdout/stderr(when foreground).
To specify a log file, use the logfile option or the S3FS_LOGFILE environment.
The main changes are shown below:
logfileoptionSpecify the log file name(path).
S3FS_LOGFILEenvironment variableSpecify the log file name(path).
If the logfile option is specified at the same time, the log file specified by the environment variable will be switched to the file specified by the
logfileoption after startup.(Thelogfileoption takes precedence)S3fsLogclassThe processing about logging has been consolidated into the
S3fsLogclass.Global variables have been changed to
S3fsLogclass variables.Some macros about logging are also aggregated into inline functions, and the macro name(function name) has changed.
SIGHUPIf specifed a log file, it will be reopened when it receives SIGHUP.
This allows log rotation.
Note: test cases have not been created for log file switching and signals.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.