Match-id-c18c69ed7f25316be55a9d9b5f459d74a873989b

This commit is contained in:
BianTanggui
2022-11-28 14:10:26 +08:00
committed by BianTanggui
parent 43b9ac790e
commit 624d8b2fba
4 changed files with 6 additions and 1 deletions

View File

@@ -14,7 +14,7 @@
#include "utils.h"
#include "logger.h"
#define FILE_MAX_SIZE (1024 * 1024 * 10)
#define FILE_MAX_SIZE (1024 * 1024 * 2)
#define LOG_PATH_DIR "/var/log/ascend-docker-runtime/"
#define TEMP_BUFFER 30
#define YEAR_OFFSET 1900

View File

@@ -70,6 +70,7 @@ func initLogModule(ctx context.Context) error {
MaxBackups: backups,
MaxAge: logMaxAge,
OnlyToFile: true,
FileMaxSize: 2,
}
if err := hwlog.InitRunLogger(&runLogConfig, ctx); err != nil {
fmt.Printf("hwlog init failed, error is %v", err)
@@ -81,6 +82,7 @@ func initLogModule(ctx context.Context) error {
MaxBackups: backups,
MaxAge: logMaxAge,
OnlyToFile: true,
FileMaxSize: 2,
}
if err := hwlog.InitOperateLogger(&operateLogConfig, ctx); err != nil {
fmt.Printf("hwlog init failed, error is %v", err)

View File

@@ -76,6 +76,7 @@ func initLogModule(ctx context.Context) error {
LogLevel: 0,
MaxBackups: backups,
MaxAge: logMaxAge,
FileMaxSize: 2,
}
if err := hwlog.InitOperateLogger(&logConfig, ctx); err != nil {
fmt.Printf("hwlog init failed, error is %v", err)

View File

@@ -75,6 +75,7 @@ func initLogModule(ctx context.Context) error {
MaxBackups: backups,
MaxAge: logMaxAge,
OnlyToFile: true,
FileMaxSize: 2,
}
if err := hwlog.InitRunLogger(&runLogConfig, ctx); err != nil {
fmt.Printf("hwlog init failed, error is %v", err)
@@ -86,6 +87,7 @@ func initLogModule(ctx context.Context) error {
MaxBackups: backups,
MaxAge: logMaxAge,
OnlyToFile: true,
FileMaxSize: 2,
}
if err := hwlog.InitOperateLogger(&operateLogConfig, ctx); err != nil {
fmt.Printf("hwlog init failed, error is %v", err)