mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-04 23:17:45 +01:00
Log error if failed to create logger for job
Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
parent
a69f86054f
commit
326e0d455a
@ -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