mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 12:15:20 +01:00
Merge pull request #6019 from steven-zou/log_creation_failure
Log error if failed to create logger for job
This commit is contained in:
commit
4d11503c24
@ -20,6 +20,7 @@ type JobLogger struct {
|
||||
func New(logPath string, level string) logger.Interface {
|
||||
f, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
logger.Errorf("Failed to create job logger: %s", err)
|
||||
return nil
|
||||
}
|
||||
logLevel := parseLevel(level)
|
||||
|
Loading…
Reference in New Issue
Block a user