Debug log messages marked as info level #160

Closed
opened 2023-07-05 12:17:50 +00:00 by anikeev-yadro · 2 comments
Member

Expected Behavior

Debug log messages should be marked as debug level

Current Behavior

Debug log messages marked as info level

Steps to Reproduce (for bugs)

  1. Create those configs:
root@aanikeev-node1:~# cat /etc/frostfs/s3/conf.d/05_logger.yml
logger:
  level: debug

root@aanikeev-node1:~# cat /etc/frostfs/s3/conf.d/90_logger.yml
logger:
  level: debug

2.Try to create container

anikeev@NB-1670:~/neofs/xk6-frostfs$ aws --no-verify-ssl s3api list-buckets --endpoint-url https://172.26.161.37
urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
{
    "Buckets": [
        {
            "Name": "sync-rep-bucket1",
            "CreationDate": "2023-07-05T12:04:38+00:00"
        }
    ],
    "Owner": {
        "DisplayName": "NXzzkU2rdLv4owQ61RDKrNx8jJZ6S5G9NW",
        "ID": "NXzzkU2rdLv4owQ61RDKrNx8jJZ6S5G9NW"
    }
}
  1. See in logs debug messages marked as info level
Jul 05 12:04:37 aanikeev-node1 frostfs-s3-gw[185123]: 2023-07-05T12:04:37.926Z        info        api/router.go:158        request start        {"request_id": "cfd2dfb0-b1c7-46d3-833d-dfc25f557685", "method": "CreateBucket", "bucket": "sync-rep-bucket1", "host": "172.26.161.37", "remote_host": "127.0.0.1"}
Jul 05 12:04:54 aanikeev-node1 frostfs-s3-gw[185123]: 2023-07-05T12:04:54.978Z        info        handler/put.go:750        bucket is created        {"request_id": "cfd2dfb0-b1c7-46d3-833d-dfc25f557685", "method": "CreateBucket", "bucket": "sync-rep-bucket1", "container_id": "HMx7A6uZp6efjfFjrrPek3MXU2jNGJHZK4SvmiaKoaSe"}
Jul 05 12:04:55 aanikeev-node1 frostfs-s3-gw[185123]: 2023-07-05T12:04:55.000Z        info        api/router.go:237        request end        {"request_id": "cfd2dfb0-b1c7-46d3-833d-dfc25f557685", "method": "CreateBucket", "bucket": "sync-rep-bucket1", "status": 200, "description": "OK"}

Version

FrostFS S3 Gateway
Version: v0.27.0-rc.1-70-g499f4c64
GoVersion: go1.19.7

Your Environment

HW
4 nodes

## Expected Behavior Debug log messages should be marked as `debug` level ## Current Behavior Debug log messages marked as `info` level ## Steps to Reproduce (for bugs) 1. Create those configs: ``` root@aanikeev-node1:~# cat /etc/frostfs/s3/conf.d/05_logger.yml logger: level: debug root@aanikeev-node1:~# cat /etc/frostfs/s3/conf.d/90_logger.yml logger: level: debug ``` 2.Try to create container ``` anikeev@NB-1670:~/neofs/xk6-frostfs$ aws --no-verify-ssl s3api list-buckets --endpoint-url https://172.26.161.37 urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings { "Buckets": [ { "Name": "sync-rep-bucket1", "CreationDate": "2023-07-05T12:04:38+00:00" } ], "Owner": { "DisplayName": "NXzzkU2rdLv4owQ61RDKrNx8jJZ6S5G9NW", "ID": "NXzzkU2rdLv4owQ61RDKrNx8jJZ6S5G9NW" } } ``` 3. See in logs debug messages marked as `info` level ``` Jul 05 12:04:37 aanikeev-node1 frostfs-s3-gw[185123]: 2023-07-05T12:04:37.926Z info api/router.go:158 request start {"request_id": "cfd2dfb0-b1c7-46d3-833d-dfc25f557685", "method": "CreateBucket", "bucket": "sync-rep-bucket1", "host": "172.26.161.37", "remote_host": "127.0.0.1"} Jul 05 12:04:54 aanikeev-node1 frostfs-s3-gw[185123]: 2023-07-05T12:04:54.978Z info handler/put.go:750 bucket is created {"request_id": "cfd2dfb0-b1c7-46d3-833d-dfc25f557685", "method": "CreateBucket", "bucket": "sync-rep-bucket1", "container_id": "HMx7A6uZp6efjfFjrrPek3MXU2jNGJHZK4SvmiaKoaSe"} Jul 05 12:04:55 aanikeev-node1 frostfs-s3-gw[185123]: 2023-07-05T12:04:55.000Z info api/router.go:237 request end {"request_id": "cfd2dfb0-b1c7-46d3-833d-dfc25f557685", "method": "CreateBucket", "bucket": "sync-rep-bucket1", "status": 200, "description": "OK"} ``` ## Version ``` FrostFS S3 Gateway Version: v0.27.0-rc.1-70-g499f4c64 GoVersion: go1.19.7 ``` ## Your Environment HW 4 nodes
anikeev-yadro added the
bug
label 2023-07-05 12:17:50 +00:00
anikeev-yadro changed title from Debug log messages should be marked as debug level to Debug log messages marked as info level 2023-07-05 12:18:25 +00:00
Owner

Those logs were intentionally set with INFO level. The idea was to have at least some records for every processed requests. This is especially important when gateway hidden besides nginx proxy and we might not be sure whether request is even come to the gateway.

Do you think this is too verbose? Maybe we can keep at least start messages in the logs.

/cc @anikeev-yadro

Those logs were intentionally set with INFO level. The idea was to have at least some records for every processed requests. This is especially important when gateway hidden besides nginx proxy and we might not be sure whether request is even come to the gateway. Do you think this is too verbose? Maybe we can keep at least `start` messages in the logs. /cc @anikeev-yadro
Author
Member

No this is not too verbose. I suggest to keep this. You can close the issue.

No this is not too verbose. I suggest to keep this. You can close the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#160
No description provided.