Skip to content

Commit

Permalink
optimization: BK_GSE_LOG_LEVEL 去掉默认值使用GSE安装包ENV (closed TencentBlueKi…
Browse files Browse the repository at this point in the history
  • Loading branch information
wyyalt authored and ZhuoZhuoCrayon committed Nov 15, 2023
1 parent 8bfd71c commit 8f0557e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ class LogConfigContext(GseConfigContext):
MODULE_ID = "LOG"

path: str
level: str = "WARN"
filesize_mb: int = 200
filenum: int = 10
rotate: int = 0
Expand Down
5 changes: 5 additions & 0 deletions apps/backend/tests/subscription/agent_adapter/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
specific language governing permissions and limitations under the License.
"""
import copy
import json

from apps.backend.subscription.steps.agent_adapter.adapter import AgentStepAdapter
from apps.backend.tests.agent.utils import VERSION, AgentBaseTestCase, ProxyBaseTestCase
Expand Down Expand Up @@ -141,6 +142,10 @@ def test_get_env(self):

self.assertEqual(proxy_env["BK_GSE_HOME_DIR"], "/usr/local/gse/proxy")

def test_render_log_level(self):
config = json.loads(self.get_config(self.agent_step_adapter.get_main_config_filename()))
self.assertEqual(config["logger"]["level"], "INFO")


class Agent2StepAdapterTestCase(AgentStepAdapterTestCase):
@classmethod
Expand Down

0 comments on commit 8f0557e

Please sign in to comment.