1
저는 Ruby Selenium-webdriver를 사용하여 스크립트를 작성하고 있습니다. 스크립트를 실행 한 후, 나는 콘솔에 다음과 같은 로그를받을 -로그가 콘솔에 출력되는 것을 방지하십시오.
LOG addons.manager: Application has been upgraded
LOG addons.xpi: startup
LOG addons.xpi: Skipping unavailable install location app-system-local
LOG addons.xpi: Skipping unavailable install location app-system-share
LOG addons.xpi: checkForChanges
LOG addons.xpi-utils: Opening database
LOG addons.xpi-utils: Creating database schema
LOG addons.xpi: New add-on [email protected] installed in app-profile
LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
LOG addons.xpi: New add-on {BBDA0591-3099-440a-AA10-41764D9DB4DB} installed in winreg-app-global
LOG addons.xpi: New add-on [email protected] installed in winreg-app-global
LOG addons.xpi: Updating database with changes to installed add-ons
LOG addons.xpi-utils: Updating add-on states
LOG addons.xpi-utils: Writing add-ons list
LOG addons.xpi: shutdown
LOG addons.xpi-utils: shutdown
LOG addons.xpi-utils: Database closed
LOG addons.xpi: startup
LOG addons.xpi: Skipping unavailable install location app-system-local
LOG addons.xpi: Skipping unavailable install location app-system-share
LOG addons.xpi: checkForChanges
LOG addons.xpi: No changes found
는 나는 단지 내 프로그램이 콘솔에 인쇄 할, STDOUT로 돌아 무엇이든지 원하는, 이러한 로그는 콘솔에 인쇄하고 싶지 않아요. 루비에서 이러한 로그를 막을 수있는 방법이 있습니까? 파이썬에서, 우리는 다음과 같은 사용하여이 작업을 수행 할 수 있습니다 -
import traceback
Settings.ActionLogs=False
Settings.InfoLogs=False
Settings.DebugLogs=False
작동하지 않았습니다. 나는 또한 가 'active_record'을 필요로 내 코드 -require '로거'에서 다음과 같은 노력 액티브 :: Base.logger = 전무 – TDHM