This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch feat/accesslog-subdir
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git

commit db99531af18662a88ac5e81cc3347ceb679475b0
Author: Hongtao Gao <[email protected]>
AuthorDate: Sat Mar 28 14:59:13 2026 +0000

    feat(liaison): organize access logs under dedicated accesslog subdirectory
    
    - Append '/accesslog' to the access log root path during server startup
    - Create the accesslog directory automatically if it does not exist
    - All ingestion and query access logs are now written to the accesslog 
subdirectory
    - Improves log organization and separates access logs from other 
application data
    - No changes required to service implementations; behavior is automatic for 
all services
---
 CHANGES.md                     | 6 ++++++
 banyand/liaison/grpc/server.go | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/CHANGES.md b/CHANGES.md
index ba7ef127a..f3b2df450 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,12 @@
 
 Release Notes.
 
+## 0.11.0
+
+### Features
+
+- Organize access logs under a dedicated "accesslog" subdirectory to improve 
log organization and separation from other application data.
+
 ## 0.10.0
 
 ### Features
diff --git a/banyand/liaison/grpc/server.go b/banyand/liaison/grpc/server.go
index a78ebd004..a73cdfd7b 100644
--- a/banyand/liaison/grpc/server.go
+++ b/banyand/liaison/grpc/server.go
@@ -21,6 +21,7 @@ package grpc
 import (
        "context"
        "net"
+       "path/filepath"
        "runtime/debug"
        "strconv"
        "strings"
@@ -44,6 +45,7 @@ import (
        propertyv1 
"github.com/apache/skywalking-banyandb/api/proto/banyandb/property/v1"
        streamv1 
"github.com/apache/skywalking-banyandb/api/proto/banyandb/stream/v1"
        tracev1 
"github.com/apache/skywalking-banyandb/api/proto/banyandb/trace/v1"
+       "github.com/apache/skywalking-banyandb/banyand/internal/storage"
        "github.com/apache/skywalking-banyandb/banyand/liaison/grpc/route"
        "github.com/apache/skywalking-banyandb/banyand/liaison/pkg/auth"
        "github.com/apache/skywalking-banyandb/banyand/metadata"
@@ -52,6 +54,7 @@ import (
        "github.com/apache/skywalking-banyandb/banyand/protector"
        "github.com/apache/skywalking-banyandb/banyand/queue"
        "github.com/apache/skywalking-banyandb/pkg/bydbql"
+       fslib "github.com/apache/skywalking-banyandb/pkg/fs"
        "github.com/apache/skywalking-banyandb/pkg/logger"
        "github.com/apache/skywalking-banyandb/pkg/partition"
        banyandbpath "github.com/apache/skywalking-banyandb/pkg/path"
@@ -228,6 +231,9 @@ func (s *server) PreRun(ctx context.Context) error {
                if s.accessLogRootPath, err = 
banyandbpath.Get(s.accessLogRootPath); err != nil {
                        return err
                }
+               s.accessLogRootPath = filepath.Join(s.accessLogRootPath, 
"accesslog")
+               lfs := 
fslib.NewLocalFileSystemWithLogger(s.log.Named("accesslog"))
+               lfs.MkdirIfNotExist(s.accessLogRootPath, 
fslib.Mode(storage.DirPerm))
        }
        if s.certFile != "" {
                if s.certFile, err = banyandbpath.Get(s.certFile); err != nil {

Reply via email to