mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-05 15:26:56 +08:00
Match-id-c18c69ed7f25316be55a9d9b5f459d74a873989b
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user